Configuring queues

In Sterling™ Order Management System Software, the JMS sender service definition framework component and the Agent framework component support placing the message headers while sending a message to the JMS Queue and the JMS Receiver component. The Agent framework can retrieve messages based on the message selector. This configuration facilitates Sterling Order Management System Software to work with a single queue. However, it is recommended that you create multiple queues for different purpose to process and monitor the messages more effectively.

Use the following syntax in the jndi.properties file for facilitating the Java client to map the JNDI name to the physical queue.
queue.<queue jndi name>=<queue physical name>

You can define multiple queues for the producers and consumers in theSterling Order Management System Software application.

A physical queue can be created from the ActiveMQ admin console or can be created dynamically when you publish a message or when you subscribe from a new queue. Queues that are referred in the asynchronous services are created while starting the integration server. For synchronous services, queue is created when a message is published for the first time.

For example,
  • queue.AGENT_Q=AGENT_Q
  • queue.AGENT_Q1=AGENT_Q1
  • queue.StartupQueue2=StartupQueue2
  • queue.StartupQueue1=StartupQueue1

Configuring queues on startup

In Apache ActiveMQ, destinations are created on demand based on your use. You can configure which destinations are available on startup explicitly in the activemq_home/conf/activemq.xml configuration. For example, add the following element.
<broker xmlns="http://activemq.apache.org/schema/core" >
  <destinations>
     <queue physicalName="StartupQueue1" />
  </destinations>
</broker>

This creates a StartupQueue1 queue when you start the ActiveMQ server.

Configuring dynamic queues

To configure with JNDI-based programs, use the dynamicQueues context.

You can look up for queues that use JNDI without any configuration.

For example, if you use dynamicQueues/MyDynamicQueue to look up into the JNDI, it returns an ActiveMQ queue with the MyDynamicQueue name. This is helpful if you can easily reconfigure the JNDI name to look up in JNDI without reconfiguring the jndi.properties file for matching.

The dynamic context dynamicQueues is useful for the Sterling Order Management System Software application where you can configure or reconfigure a service or an agent criteria to a new queue, immediately send messages to that queue, and process the messages asynchronously. Set dynamicQueues/<a physical queue name> to JMS Queue Name or Destination Name fields in the service definition framework of the Applications Manager.

Queue name can be configured as variables in Sterling Order Management System Software and variables are resolved in the Sterling Order Management System Software application.

Give the queue name as dynamicQueues/${yfs.CUSTOM.searchIndex.build.queue}. The variables such as yfs.CUSTOM.searchIndex.build.queue are set in the custom_overrides.properties file and are therefore kept outside the configuration.