Sends Extracts to a JMS Destination
Extract Services can send the generated extract to a JMS destination. Before sending the extracts to a JMS destination:
- Configure the connection to the Message Broker as described in Configure a JMS Connection.
- Configure the destination queue or topic in a stream in Message Center Console as shown in Configure a JMS Destination Stream.
- Change the w_config_custom.inc to configure the JMS stream name as shown in Configure Extract Service JMS Stream Name.
- Restart the Extract Service (MC2) after completing the configuration.
Some examples of REST and SOAP requests are shown below.
When Extract Service publishes the messages it adds the following JMS Headers to each message:
- EagleExtractRecordCount - the number of records in the message.
- EagleExtractSequenceNumber - the sequence number of the message when nuggetizing is enabled.
- EagleExtractFileName - the file name generated for the extract.
- EagleCorrelationId - the correlation id of the extract request.
Configure a JMS Connection
The JMS Connection is configured by adding a JMS Connection configuration JSON file in the estar/tpe/dynamic/mc2/eaglejms/connections folder. The samples below show how to configure the JMS connections to ActiveMQ and WebSphere MQ servers. For a more detailed description see #JMS Messaging.
Configure an ActiveMQ Connection
If there is no ActiveMQ connection already configured, add a new file estar/tpe/dynamic/mc2/eaglejms/connections/extract_jms_connection.json with the following content:
- Change the Region parameter to match the oracle SID the Eagle Extract Service is running with.
- Change the brokerURL with the specific ActiveMQ instance parameters. The ActiveMQ hostname and port number should be provided by the ActiveMQ broker administrators.
Configure a WebSphere MQ Connection
If there is no WebSphere MQ Connection already configured, add a new file estar/tpe/dynamic/mc2/eaglejms/connections/extract_jms_connection_wmq.json with the following content:
Change the following parameters:
- Set Region to the Oracle SID running the Eagle Extract Service is.
- Set port to the WebSphere MQ port number.
- Set channel to the channel name on the WebSphere MQ.
- Set queueManager to the name of the Queue Manager.
- Set HostName to the host name or IP address of the Queue Manager.
In order to use WebSphere MQ, install the WebSphere MQ Client with Java classes.
SSL Connections
To configure a WebSphere MQ SSL Connection add the "SSLCipherSuite" parameter to the "Parameters" section in the connection definition:
"SSLCipherSuite": "TLS_RSA_WITH_AES_128_CBC_SHA256"
The private keys and public keys should be places in the eagle/estar/tpe/dynamic/mc2/
Eagle will be adding out of the box support for easier configuration of truststore and keystores for JMS connections.
Configure a JMS Destination Stream
Open Message Center Console and create a MC2JMS stream with the following parameters:
Set the following parameters:
- Instance - set to the MC2 instance with AppID 10000
- Connection Name - the name of the connection as defined in the JSON connection definition file ConnectionName parameter. Use extract.jms.connection if you used the sample JSON Connection files above.
- Destination Type - select QUEUE or TOPIC.
- Destination Name - the queue or topic name.
- JMS Connection User and JMS Connection Password - the credentials used to connect to ActiveMQ
Configure Extract Service JMS Stream Name
Add to eagle/estar/tpe/dynamic/msgcenter/eagle_ml-2-0_custom_cm//w_config_custom.inc a W_JMS_EXTRACT_STREAM variable with the name of the stream created above (mc2_extract_jms_publish):
You can use the W_JMS_EXTRACT_RETRIES and W_JMS_EXTRACT_RETRYINTERVAL to redefine the number of delivery retries in case of an error and the interval in seconds between retries.
Specify the Outbound MC2JMS stream name (W_JMS_EXTRACT_STREAM) in the RTR as the JMSExtractStream task parameter.
REST and Soap Extract Examples
Send the REST Extract Results to a JMS Destination
To send the extract to the JMS destination defined above, add a ExtractDeliveryMethod=JMS to the REST request as in this example:
http://eagle.webserver.com/eagle/v2/entities?maxrows=10&OutputFormat=json&ExtractDeliveryMethod=JMS
Send the SOAP Extract Results to a JMS Destination
To send the extract results to the JMS destination add a ExtractDeliveryMethod task parameter with value JMS to the RunTaskRequest:
To split the extract in smaller messages and send to JMS, add the RecordCountPerNugget and DirectTransform=N parameters.
Send the TSR and ACK to a JMS Destination
To send the TSR to a JMS Destination, use the ReplyDeliverMethod=JMS and JMSReplyDeliveryStream=stream name parameters.
To send the ACK to a JMS Desitnation, use the ACKDeliveryMethod=JMS and JMSACKDeliveryStream=stream name parameters.