Post message from DB2 to Mq web sphere - db2

Is there an alternate way to post message to mq from DB2 triggers other than MQSEND, I need to send mq group ID along with the payload.

Related

Is it considered bad architecture to have a downstream service access write APIs in an upstream service?

I have a boss that is gung ho about only having downstream services consume data from an upstream service. However, we have situations where it would make sense to have the downstream service send an update to the upstream service, which naturally he is completely against.
So my question is is it bad architecture to have a downstream services send update data to an upstream service?
Seems like RESTful apis would be horrible architecture on an if that is the case, considering an upstream service would never have the need for a PUT, only GETs.
Is he wrong, or what am I missing?
It sounds like a job for messaging. I've built a few of these integrations where systems broadcast changes in their environment to a message broker and anything that's interested in that change consumes the message and acts accordingly. A shared message format is required though.
If Upstream service is A and Downstream service is B, then
B accepts a new user ingest. B processes the request and creates a new user. B then creates the message, for example:
<user mode="new">
<name></name>
<email></email>
</user>
or
<users>
<user mode="new">
<name></name>
<email></email>
</user>
<users>
and sends it to a topic at the message broker, e.g. Apache ActiveMQ. The topic could be:
/user
A can either be a durable subscriber to the user topic or you can use Apache Camel to route the message to another topic which A would subscribe to. Persistent messages and durable topic consumers ensure messages aren't lost if the broker goes down, in theory.
A sees the user message, sees the mode is new and examines the email to see if it needs to create the user. A then processes the message and does what it needs to do.
At this point, if there are other systems that would need to know about the new user A can broadcast the message to another topic which they listen to. You would do that if A needs to know about a new user first and then decide who else needs to know. If they all need to know, then they can all subscribe to the user topic.
Using messaging, no system needs to know about any other system. Each system just broadcasts events in a known format (in this case a domain specific XML message but JSON is fine).
If you have multiple clients, each can do their own ingest then broadcast an appropriate message or messages, perhaps one per user even, to the topic and all the other systems can act on it.
If you don't want to use XML or JSON you could attach a CSV of all new users to the message. The key is, all other systems should know what the message format is.

TIBCO BW JMS Queue Sender

I am using JMS Queue Sender pallete to send message through MQ queue to an application which uses MQ interface to read the message and it expects ApplIdentityData and format = 'MQSTR' as part of the MQ header.
Not sure how I can implement it in TIBCO BW; could some please help me.
Checkout https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q032020_.htm
If you set a JMS message property with those names you can control the MQMD Header information. For example msg.setStringProperty("JMS_IBM_Format","777"); would change that format. But if you send a JMS TextMessage you should already get the correct MQ Format. Your MQ Application name will be filled in (something derived from Business Works) by the send method. I think the rows with "Set By" "Send Method" you can't control.

WSO2 esb processor send message to queue and other processor receive specific message from queue

WSO2 esb:
(in Api)processor1 send message to queue and other processor2 wait for specific message to get it. Is it possible that processor2 wait for specific message, if found then send to destination?
this is flow diagram

Message brokers - "message has been read" acknowledgment solution

I am implementing a service that dispatches messages to clients using an arbitrary message broker. A single user may have multiple clients and the message will be dispatched to each one of them. Once the user has read the message on one client, I want the message removed from the user's other clients.
Do message brokers typically implement this functionality, or will I need a custom solution?
For a custom solution, I was thinking that the broker could maintain a separate reply topic to which a client will deliver a message to say that the user has read the message. The service can consume messages on this reply topic, and dispatch another message to the user's other clients that tells them to remove the message.
Is this how such a solution might typically be implemented?
If it helps, I am considering using MQTT as a message protocol.
There is no concept of even end to end message delivery notification in the MQTT protocol1, let alone read notification. You are likely to need to implement this your self.
If I was doing this I would have 2 topics per user something like this:
[user id]/msg
and
[user id]/read
I would make the payload of the messages delivered to the [user id]/msg contain a message id. I would then publish the message id on the [user id]/read topic. All clients would subscribe to both, that way they could easily mark as read/remove messages as they were consumed on other clients.
1confirmation for higher QOS levels are between the publisher and the broker and then between the broker and the subscriber

Spring-integration: Put message into JMS queue only if e-mails has been sent

I want to send a mail and only if this works put a message into a JMS queue.
How can I do it? I couldn't find any mail:outbound-gateway.
OBS: By now a am using publish-subscribe-channel, but this is not exactly what I need.
OBS: By now a am using publish-subscribe-channel, but this is not exactly what i need.
Why not?
There are several techniques to do this:
Publish subscribe channel with the JMS endpoint the second subscriber (mail order="1", jms order="2") (with ignore-failures="false" - the default).
Recipient List Router
Expression Evaluating Request Handler Advice