Blog
Create an IBM MQ definition and channel and a given service will be invoked for each message taken off a queue. The request, stripped off the MQRFH2 JMS headers, will be in self.request.payload
.
# -*- coding: utf-8 -*-
# Zato
from zato.server.service import Service
class MyService(Service):
def handle(self):
self.logger.info('Message received: %s', self.request.payload)
Create an IBM MQ definition and outgoing IBM MQ connection and send a message like in the example below.
MQRFH2 JMS headers can be added by Zato so that from the receiving side everything seamlessly appears as though Zato was a Java application.
# -*- coding: utf-8 -*-
# Zato
from zato.server.service import Service
class MyService(Service):
def handle(self):
self.outgoing.ibm_mq.send('my-message', 'outgoing-connection-name', 'QUEUE.1')
Book a demo with an expert who will help you build meaningful systems that match your ambitions
"For me, Zato Source is the only technology partner to help with operational improvements."