ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Pub/Sub - Publish without using an MQInput/Output

Post new topic  Reply to topic Goto page 1, 2  Next
 Pub/Sub - Publish without using an MQInput/Output « View previous topic :: View next topic » 
Author Message
uncodead
PostPosted: Thu Jul 20, 2017 12:38 pm    Post subject: Pub/Sub - Publish without using an MQInput/Output Reply with quote

Novice

Joined: 28 Mar 2017
Posts: 10

In a REST application, i need to publish a message in this flow:
RESTApi -> ComputeNode -> Publication -> ...

Can I publish without using an MQInput / Output?
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Jul 20, 2017 1:32 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

What does the "Subscription Point" property of the Publication node do?

How would you get anything out of a broker with an MQInput node?

If you in fact mean "Can I subscribe to a publication without using an MQInput node?" then no, IIB lacks a Subscription node. It needs to pick up publications from a queue but can then interpret all of the publication details (Topic name and so forth) as if it had subscribed.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
uncodead
PostPosted: Thu Jul 20, 2017 1:44 pm    Post subject: Reply with quote

Novice

Joined: 28 Mar 2017
Posts: 10

Vitor wrote:
What does the "Subscription Point" property of the Publication node do?

How would you get anything out of a broker with an MQInput node?

If you in fact mean "Can I subscribe to a publication without using an MQInput node?" then no, IIB lacks a Subscription node. It needs to pick up publications from a queue but can then interpret all of the publication details (Topic name and so forth) as if it had subscribed.



My scenario is the following:

I get a rest request and I need to post the received message to a topic. But I would not want to put the message in a queue and then publish it using: MQInput node -> Publication node.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 20, 2017 3:01 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

So you need
1) A node to receive an HTTP REST request
2) A node to transform your data
3) A node to publish a message.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
uncodead
PostPosted: Thu Jul 20, 2017 3:40 pm    Post subject: Reply with quote

Novice

Joined: 28 Mar 2017
Posts: 10

mqjeff wrote:
So you need
1) A node to receive an HTTP REST request
2) A node to transform your data
3) A node to publish a message.


the question is how can i do it in esql only
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Jul 20, 2017 6:00 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

uncodead wrote:
mqjeff wrote:
So you need
1) A node to receive an HTTP REST request
2) A node to transform your data
3) A node to publish a message.


the question is how can i do it in esql only


Do what? Publish a message?

Use the propagate statement, that sends the message to an output node.

You haven't even said what transport you are using to do pub/sub on. MQ? MQLight? MQTT? Kafka? RabbitMQ? JMS? Unknown raw TCP format? Homing Pigeons?

So, yes, you can publish a message without using an MQInput node and an MQOutput node, or even a Publication node...

But ESQL doesn't let you directly send data to an external transport.

So if you need to publish a message, you need a node to publish it.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
uncodead
PostPosted: Thu Jul 20, 2017 6:19 pm    Post subject: Reply with quote

Novice

Joined: 28 Mar 2017
Posts: 10

mqjeff wrote:
uncodead wrote:
mqjeff wrote:
So you need
1) A node to receive an HTTP REST request
2) A node to transform your data
3) A node to publish a message.


the question is how can i do it in esql only


Do what? Publish a message?

Use the propagate statement, that sends the message to an output node.

You haven't even said what transport you are using to do pub/sub on. MQ? MQLight? MQTT? Kafka? RabbitMQ? JMS? Unknown raw TCP format? Homing Pigeons?

So, yes, you can publish a message without using an MQInput node and an MQOutput node, or even a Publication node...

But ESQL doesn't let you directly send data to an external transport.

So if you need to publish a message, you need a node to publish it.


ok, i'm using MQ, i need to know what i need to do in esql to publish the message to a topic.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jul 20, 2017 8:16 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

uncodead wrote:

ok, i'm using MQ, i need to know what i need to do in esql to publish the message to a topic.

You need to have an RFH2 header on the message, specifying the topic you want to publish to and you need to make your next node be the publish node.
If you want to know if you got published, make it a request message, and read the return code from the publish, in the RFH2 of the reply message...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Fri Jul 21, 2017 12:30 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

fjb_saper wrote:
uncodead wrote:

ok, i'm using MQ, i need to know what i need to do in esql to publish the message to a topic.

You need to have an RFH2 header on the message, specifying the topic you want to publish to and you need to make your next node be the publish node.
If you want to know if you got published, make it a request message, and read the return code from the publish, in the RFH2 of the reply message...

Have fun


Or simply write the message to a correctly configured ALIAS Queue.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
timber
PostPosted: Fri Jul 21, 2017 3:00 am    Post subject: Reply with quote

Grand Master

Joined: 25 Aug 2015
Posts: 1280

Quote:
the question is how can i do it in esql only
You cannot. You have to use a Publication node. Why do you want to do it in ESQL only?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 21, 2017 3:48 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

In IIB v9, you do not need an MQRFH2

Again.

ESQL does not let you send data to any transport.

You can call procedures in other languages. Those other languages can send data to different transports.

It's very poor design to use, for example, a JavaCompute node to publish a message to an MQ topic using JMS. Or use any other language to send data to any transport that already has an Output node for that.

It's a very poor design.

Use the product. Stop trying to skip steps and make your code much harder to read.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Android 23
PostPosted: Fri Jul 28, 2017 1:43 am    Post subject: Reply with quote

Apprentice

Joined: 27 Mar 2017
Posts: 38

Quote:

Can I publish without using an MQInput / Output?

Yes, you publish the message because Pub/Sub is not related to the message flow.

Quote:


My scenario is the following:

I get a rest request and I need to post the received message to a topic. But I would not want to put the message in a queue and then publish it using: MQInput node -> Publication node.


No need of MQ nodes because we directly subscribe to the topic in it.
And the message moves into Subscription queue.

Thanks & Regards
Android 23
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 28, 2017 5:02 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Android 23 wrote:
No need of MQ nodes because we directly subscribe to the topic in it.
And the message moves into Subscription queue.


I'll bite - how are you getting IIB to "directly subscribe" to the topic without using any of the MQ nodes?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Jul 28, 2017 5:11 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
Android 23 wrote:
No need of MQ nodes because we directly subscribe to the topic in it.
And the message moves into Subscription queue.


I'll bite - how are you getting IIB to "directly subscribe" to the topic without using any of the MQ nodes?


JMSInput...
KafkaConsume...
LoopBBackRequest, with an appropriate Loop Back connector...
MQTTInput
.NETinput (for MSMQ)....
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
zpat
PostPosted: Fri Jul 28, 2017 7:02 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5849
Location: UK

Avoidance of MQ is not exactly a virtue.

You get a MQ license with broker and it is by far the most proven and reliable messaging product to use. Pub/sub is built-in, support is excellent and it's widely used by large companies. It has been here 20 years and should be here well into the future (unlike some).

Apparently it even has a helpful user community.
_________________
Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Pub/Sub - Publish without using an MQInput/Output
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.