🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
How to prevent queue creating automatically from the programming?
Hello Team,
Our Requirement:
Solace DEV team will create few queues in the solace portal and they will send the queue list to the application development team to consume messages from available queues.
Application DEV team should not create any new queues programmatically/manually from code. They have to only consume messages from the available queues.
Issue:
If the solace DEV team deletes one queue from the portal and if the application code still trying to consume message for the deleted queue. Instead of throwing an error, it's creating a new queue for the deleted queue(which deleted by the solace DEV team) programmatically. We are referring to the below code to initialize the queue object.
JAVA: final Queue queue = JCSMPFactory.onlyInstance().createQueue(queueName);
C#: IQueue queue = ContextFactory.Instance.CreateQueue(kvp.SolaceQueueName);
Please can you help me to prevent creating a queue programmatically?
Regards,
Umesh
umesh.srinivasan@hp.com
Comments
-
Hi Umesh,
I think you are using Queue creator class code in Java to create a Queue using below as per your question and you are passing some value of in varibale queueName="YourQueueNametoBeProvision" .
final Queue queue = JCSMPFactory.onlyInstance().createQueue(queueName);
or set the property in provision method JCSMPSession.FLAG_IGNORE_DOES_NOT_EXIST
Please let me know if you find any other solution.0 -
Hi @Umesh the createQueue() method only creates a local queue object for the client application. To dynamically create a queue on the broker a client application would use the session provision() method. To prevent the queue being dynamically provisioned on the broker check your client code and remove the provision() method call, or alternatively you can prevent dynamic endpoints by disabling "Allow Client to Create Endpoints" in the client profile used by the application.
HTH2