none
qpid proton C to send message to Topic and receive from subscription RRS feed

  • 问题

  • I downloaded sample qpid proton C for Azure from https://github.com/Azure/azure-service-bus-samples/tree/master/proton-c-queues-and-topics and build the sender08 and receiver08 successfully on Ubuntu 1404 LTS.

    I also created Azure Topic ans Subscription as below:    

    Topic: lighting
    Policy name: lighting_policy
    Endpoint=sb://keyasicyun.servicebus.chinacloudapi.cn/;SharedAccessKeyName=lighting_policy;SharedAccessKey=RQNti36ZIYIAoaD3PhWw+CPzezmDBIyEPxDGa0p4vW0=

    Subscription: lighting_sub
    Endpoint=sb://keyasicyun.servicebus.chinacloudapi.cn/;SharedAccessKeyName=lighting_policy;SharedAccessKey=RQNti36ZIYIAoaD3PhWw+CPzezmDBIyEPxDGa0p4vW0=

    When I run this sample, I have errors like this -

    ./bins/08/sender08 keyasicyun.servicebus.chinacloudapi.cn lighting_policy RootManageSharedAccessKey RQNti36ZIYIAoaD3PhWw+CPzezmDBIyEPxDGa0p4vW0=

    Sending messages to amqps://RootManageSharedAccessKey:RQNti36ZIYIAoaD3PhWw%2BCPzezmDBIyEPxDGa0p4vW0%3D@keyasicyun.servicebus.chinacloudapi.cn.servicebus.chinacloudapi.cn/lighting_policy
    CALL pn_messenger_set_outgoing_window... RETURNED 0
    CALL pn_messenger_set_blocking... RETURNED 0
    CALL pn_messenger_start... RETURNED 0
    CALL pn_messenger_put... RETURNED 0
    ....hanging......

    ./bins/08/receiver08 keyasicyun.servicebus.chinacloudapi.cn lighting_policy/Subscriptions/lighting_sub RootManageSharedAccessKey RQNti36ZIYIAoaD3PhWw+CPzezmDBIyEPxDGa0p4vW0=

    CALL pn_messenger... RETURNED
    CALL pn_messenger_set_timeout... RETURNED 0
    CALL pn_messenger_set_snd_settle_mode...RETURNED 0
    CALL pn_messenger_set_rcv_settle_mode...RETURNED 0
    CALL pn_messenger_set_incoming_window... RETURNED 0
    CALL pn_messenger_subscribe... RETURNED
    pn_messenger_subscribe returned NULL

    I didn't check the box for "Enable Partitioning" when I create topic.

    Since I didn't change the program, it must be key string and/or topic/subscription name error.

    Does anyone know what is wrong?

    Thanks

    2015年1月16日 3:51

全部回复

  • Hi,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Best Regards,

    Will


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2015年1月18日 11:17
    版主
  • Hi dhsia,

    I checked sample below and believe it's for GLOBAL azure, not china azure.

    https://github.com/Azure/azure-service-bus-samples/blob/master/proton-c-queues-and-topics/common.h

    The functionaility of global azure and china azure are exactly the same, the only difference is the endpoint/domain address. However, this difference usually cause code compatbility issue.

    To get the sample code above working with China azure servicebus, you can fork the code in github and update endpoint/domain according to document below

    https://msdn.microsoft.com/en-us/library/azure/dn578439.aspx

    Or, you can contact the code author for help.

    Thanks,


    • 已编辑 Maud L 2015年1月21日 9:46
    2015年1月21日 9:45