Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.34k stars 1.98k forks source link

Queue Attributes #1810

Closed sharadholani closed 5 years ago

sharadholani commented 7 years ago

This issue is related to queue metadata support provided by the 0.9.0 version of the Azure Service Bus Client for java.

Amazon SQS provides support to change few queue attributes after the creation of queue .

Specifically , I am looking for these 3 attributes ->

Max Message Size Server Wait Time Lock Duration of message

The com.microsoft.windowsazure.services.servicebus.models.QueueInfo (QueueInfo) class provides support to change lock duration of a message (setLockDuration() method call).

I can use this API to change the lock duration attribute for the queue even after the queue has been created.

What I am looking for are similar support to change the other two queue attributes ( Max Message Size and Server Wait Time ).

A default value for Server Wait time , I believe , is there in the AMQP client , where the value has been set to 30 seconds (DefaultOperationTimeout in com.microsoft.azure.servicebus.primitives.MessagingFactory.java class).

So , the server waits for 30 seconds before responding to a receive message call , if there are no messages in the queue at that instant. Right ?

Can we get support to change this value and maybe set this value on the queue as attributes so that any client listening to that queue can see this value and update it ?

Also support to change the max message size for a queue at any time . (At the server side , not at the client side ).

Or could you propose any alternative to change these 2 queue attributes ?

I know management operations are not yet supported by the latest AMQP client code . Till that is provided in there , I will have to continue using the older version of the client simultaneously .

If this is not the correct forum for this issue , could you please redirect me to the appropriate place maybe ?

anuchandy commented 7 years ago

@sharadholani

Managment client library

The client library for service bus management operations package can be found here mvn azure-mgmt-servicebus. The source code for the same is located in this repo here.

For management samples, look for the section "Service bus" here.

Data plane client library

For client library for service bus data plane operations, use the package https://github.com/Azure/azure-service-bus-java/releases.

For data plane samples see Queue Send Sample and Queue Receive Sample

Now coming back to your questions

  1. Regarding Queue message size, referring https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas, it seems "message size for a queue” is static, 256 KB for standard tier and 1 MB for premium tier. Given it is static not sure this can be changed later.

  2. Regarding "Server Wait Time", I don't see this is currently configurable via management API calls.

I would let service team confirm these, @dsouzaarun [From service team], could you please take a look at the questions from sharadholani?

anuchandy commented 7 years ago

Tagging owner from service team @binzywu

vhvb1989 commented 5 years ago

Hello @sharadholani. Can you mention if you are still waiting on an answer for this issue or if this is good to be closed now.

Note: As part of repository cleaning effort, this issue will be closed by Sep 12 if no response is received from submitter and/or not further action is required.

vhvb1989 commented 5 years ago

Closed as User does not need further support on this