Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Creating a message producer to send messages to a Message Queue server (MQ server) server.
  • Creating a message consumer to receive messages from a an MQ server.
  • Sending the message to a Jobscheduler.

To be able to process the message The message has to be an XML snippet which is valid to the JobScheduler XML Schema to be processed on the desired JobScheduler the message has to be a XML snippet wich can be processed by the JobScheduler API respectively by the JobScheduler XML interface.

Most of the implementation was done with the standard jms implementation of Java. The only class from the active MQ implementation is the ActiveMQConnectionFactory class. It shouldn´t be too complex, to change the implementation with the ConnectionFactory of your desired message queue service.

The MessageProducer

This example describes how to build a connection to a an MQ server and send a message to a queue on this server. This example uses Apache Active MQ as the message queue MQ server.

Most of the implementation was done with the standard jms implementation of Java. The only class from the active MQ implementation is the ActiveMQConnectionFactory class.

  1. Create a connection.
  2. Create a session.
  3. Create a destination.
  4. Create a producer.
  5. Send a message with the producer.
  6. Close the connection.

...

This example describes how to build a connection to a MQ server and receive a message from a queue on this server. Furthermore it describes how to build a TCP socket connection to send the received message to a JobScheduler.
This example uses Apache Active MQ as the message queue MQ server.

  1. Create a connection.
  2. Create a session.
  3. Create a destination.
  4. Create a consumer.
  5. Receive a message with the consumer.
  6. Close the (MQ) connection.
  7. Open a TCP connection to a JobScheduler instance.
  8. Send the Message to the JobScheduler
  9. Close the (TCP) connection.

...