none
Questions around Java AMQP 1.0 Client for Service Bus.

    Question

  • I have few questions and need pointers for few things. All the below requirements are for writing JAVA application.

    1.        I need some latest sample code for using JAVA AMQP 1.0 with Service Bus Queue. The sample code in Microsoft web site (https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-jms-api-amqp) doesn’t work with latest Apache Qpid JMS AMQP 1.0 client library.
    2.        Is AMQP management API (for creating/deleting and managing Service Bus Queue and other entities) supported in Service Bus? Please point me to documents and sample code. If it is not supported, what is the alternate way for creating /deleting Service bus queues from Java AMQP client?
    3.        How is Message Visibility can be set/reset from JAVA AMQP client? I saw some document which says that the message will become visible automatically when receiving Client crash without sending Acknowledgement / Rejection to service bus. And no explicit way to set message visibility from JAVA AMQP client. If it is right, what is the alternate for Java AMQP client?
    4.        Need documentation for setting message properties (like message delay timer, message expiry and so on) from JAVA AMQP client.
    5.        Will be “Apache Qpid JMS AMQP 1.0 lib” able to support my requirements above with Service Bus? Or Is there any AMQP based SDK from Microsoft?
    6.        What are the limitation when we use Service Bus Queue from JAVA AMQP client (vs using Azure Java SDK directly)?
    • Edited by tumapath Friday, March 03, 2017 8:58 AM
    Friday, March 03, 2017 8:43 AM

All replies

  • One very straight question. Are you trying to implement your own messaging client on Java? There is one official client under development. Were you able to check it first before going through all the hassles of implementing this from scratch? Here is the GitHub repo for Java client. https://github.com/azure/azure-service-bus-java

    Monday, March 06, 2017 5:31 PM
  • Serkant, the repo is not public yet. but should be in near future.
    Tuesday, March 07, 2017 1:10 AM
  • 1. You can refer to this thread: https://social.msdn.microsoft.com/Forums/en-US/72494591-133c-47f8-911f-ad8d1ada7310/sample-service-bus-java-amqp-example-is-failing?forum=servbus

    2. No, today the management for service bus queue and topic doesn't support AMQP. You can use REST APIs to management the entities.

    3. Service Bus today doesn't support set message visibility. An alternative is to defer the message (send modified disposition and not deliverable here) however, deferred message only can be received by sequence number. Another is to deadletter messages (send reject disposition) to move the message to deadletter queue to process separately. Visibility is an ask as user voice which we will be evaluating and prioritizing.

    4. We have a document about this and please let us know if you see anything missing: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-protocol-guide

    5. if you are asking specific for java. we are actively developing one library and will be open sourced. The repo should be open to public in near future.

    6. Azure Java SDK is calling Service Bus REST api internally. There will be performance difference and some features are not supported by REST, e.g. session.

    Tuesday, March 07, 2017 1:27 AM
  • Thank you for your reply. One more question related to above. If I have to use REST API for provisioning namespace and Queue in Azure Service Bus, How to get shared access policy name and key programmatically for using it in AMQP client?
    Wednesday, March 15, 2017 5:43 PM
  • AMQP client doesn't provide such capability. You can do that by Powershell cmdlet Get-​Azure​SB​Authorization​Rule.

    https://docs.microsoft.com/en-us/powershell/module/azure/get-azuresbauthorizationrule?view=azuresmps-3.7.0

    Tuesday, April 11, 2017 4:22 PM