TAzureQueueManagement

From RAD Studio
Jump to: navigation, search

Go Up to Azure and Cloud Computing with DataSnap

Warning: DSAzure API is deprecated and has been replaced by Data.Cloud.AzureAPI. You are encouraged to use the new API when developing cloud computing applications. See Cloud Computing with DataSnap for more information.
Note: The TAzureQueueManagement component is available in the Tool Palette only if you install the dclWindowsAzureManagement190.bpl package, that you can find in the bin folder of the RAD Studio installation folder. TAzureQueueManagement is only available for VCL applications.

To use a TAzureQueueManagement component, drop it on a form, and then drop a TAzureConnectionString onto the form as well. Type your AccountKey and AccountName into the appropriate properties of the TAzureConnectionString component. The next step is to set the ConnectionInfo property of the TAzureQueueManagement component to use this TAzureConnectionString. That is all you need to do in order to set up the TAzureQueueManagement component. However, you can also choose to set the Active property to True on the component, when the form is created. If you don't do this, then there will be a context menu item on the component at run time to activate it.

Once the component is running and activated, you can right-click the root node to add a new Queue or to refresh the current list of queues. With Microsoft Azure, you can have many queues, and each queue can have many messages, although the REST API, and therefore the TAzureQueueManagement component, is limited to showing only the first 100 messages of each queue. There is no guarantee the list you are looking at is in sync with the server any time after it is populated. At any time, to get the most current list of queues/messages, refresh the component from the context menu.

Note: When adding a queue, you need to specify a name that is at least 3 characters long, all lowercase (the component will automatically do this for you), and containing only letters, numbers, and/or hyphens (-).

On each queue node, you can choose to remove the queue, clear all messages from the queue, or add a message to the queue. A message is a string that has been pushed into the queue to serve whatever purpose the consumer of the queue uses it for. Unless you are clearing all the queue messages, only one message can be removed at a time. You also have the option, from this node, to refresh only this specific queue.

On the first (top) message node of a queue, you have the context menu option that can be used to remove it. This displays the message and then the next message in line becomes the new top message, as expected.

See Also