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 IndexIBM MQ API Supportnode.js access to MQ API

Post new topicReply to topic Goto page 1, 2  Next
node.js access to MQ API View previous topic :: View next topic
Author Message
sebastia
PostPosted: Tue Jun 02, 2015 10:28 pm Post subject: node.js access to MQ API Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

It's been quite long since we have MQCB() and I think it is the way to implement the access to MQ from node.js

Googl'ing shows access from node.js to RabbitMQ, zeroMQ, etc, but not Websphere MQ

Can you tell if such a library has been implemented or is on the way ?

I am not interested in MQ Light, by the way.

Thanks.
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Wed Jun 03, 2015 2:46 am Post subject: Re: node.js access to MQ API Reply with quote

Grand Poobah

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

sebastia wrote:
It's been quite long since we have MQCB() and I think it is the way to implement the access to MQ from node.js

Googl'ing shows access from node.js to RabbitMQ, zeroMQ, etc, but not Websphere MQ

Can you tell if such a library has been implemented or is on the way ?

I am not interested in MQ Light, by the way.

Thanks.


In MQ 8.0.0.2 there is a beta. You need to set the qmgr cmd level to 8.0.0.1
This will give you a channel that acts as an endpoint for AMQP. (node.js).

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sebastia
PostPosted: Wed Jun 03, 2015 2:50 am Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

I am very interested ...

I can have mq v8 by tomorrow
Fix pack 8.0.0.2 - no problem
Cmd level - no problem

But I'd like to have some doc - does it come withe Fix Pack ?

Is there any pointer available ?

Any URL ?

Does this feature have a "name" so I can Google it ?

Thanks a lot !
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Wed Jun 03, 2015 2:54 am Post subject: Reply with quote

Grand Poobah

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

sebastia wrote:
I am very interested ...

I can have mq v8 by tomorrow
Fix pack 8.0.0.2 - no problem
Cmd level - no problem

But I'd like to have some doc - does it come withe Fix Pack ?

Is there any pointer available ?

Any URL ?

Does this feature have a "name" so I can Google it ?

Thanks a lot !
Look it up it's on developerworks AMQP type channel (or something like it)
https://www.ibm.com/developerworks/community/blogs/messaging/entry/mq_support_for_mq_light_beta_now_available?lang=en
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
sebastia
PostPosted: Wed Jun 03, 2015 2:59 am Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

AMQP is implemented in MQ Light

Unfortunatelly, as far as I know, MQ Light does not interact with MQ.

Correct me if I am wrong.
Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Wed Jun 03, 2015 3:02 am Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

from here :

>>> https://www.ibm.com/developerworks/community/forums/html/topic?id=0ee289c3-b7e1-44d6-a5ec-3d7eedbc9086&ps=25

===
Currently there is no mechanism for MQ Light to connect directly to MQ.
===

I wish I could understand more in deep the meaning of "DIRECTLY" ...

Does is exist a way to connect Mq to MQ Light "indirectly" ???
Back to top
View user's profile Send private message Visit poster's website
fjb_saper
PostPosted: Wed Jun 03, 2015 5:07 am Post subject: Reply with quote

Grand Poobah

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

sebastia wrote:
from here :

>>> https://www.ibm.com/developerworks/community/forums/html/topic?id=0ee289c3-b7e1-44d6-a5ec-3d7eedbc9086&ps=25

===
Currently there is no mechanism for MQ Light to connect directly to MQ.
===

I wish I could understand more in deep the meaning of "DIRECTLY" ...

Does is exist a way to connect Mq to MQ Light "indirectly" ???

Did you read the full post or just the top. At the time the question was asked MQ 8.0.0.2 with AMQP beta was not out yet.

The mechanism to talk to js.node back and forth is via pub/sub.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Jun 03, 2015 5:08 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17191

You *could* also use MQTT...
Back to top
View user's profile Send private message
sebastia
PostPosted: Thu Jun 04, 2015 2:50 am Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Jeff - I played around MQTT when it came out and skipped to MOSQUITTO after a while. In fact, I have half a dozen of VMs publishing "I am alive" message to a central site using REXX.

Are you saying that now I can access MQTT from NODE.JS ?

Because there was a C API, and a PERL and a CURL and a JAVA access in those days, but no node.js ...

And still nothing in

>>> http://mosquitto.org/api/files/mosquitto-h.html

Can you provide any pointer, url or whatever ?

Thanks.

The fact is, as node.js runs everything on CallBack() functions, and MQ did implement it (in v7.0 I'd say), I got the feeling those two products were ment to join someday.

Imagine this APP.JS :

Code:
===
app.get( '/connect-to-mq', function ( req, res ) {
   var MyParams = req.params.myparams ;
   MyMQ.connect ( MyParams, function ( err, result ) {
      if ( err ) {
         console.log( "--- Cant connect to QMGR. Error is (%s)." ) ;
         res.status( 500 ).send( "--- connect error." ) ;
      } else {
         res.status( 200 ).send( "+++ connect OK." ) ;
      } ; // else
   } ) ; // connect CallBack
. . .
===


Sebastian
Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Thu Jun 04, 2015 4:27 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17191

You should be able to use the websockets interface of mqtt to connect to MQTT from any JavaScript runtime - Node.js for example...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Jun 04, 2015 4:50 am Post subject: Reply with quote

Grand Poobah

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

Typically node.js connects to an MQLight server identified by host and port?
Replace this by the AMQP channel of MQ8.0.0.2 giving the MQ host and the port for the AMQP channel...
Direct connection achieved...

Try the Beta!
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Jun 04, 2015 4:54 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17191

fjb_saper wrote:
Typically node.js connects to an MQLight server identified by host and port?
Replace this by the AMQP channel of MQ8.0.0.2 giving the MQ host and the port for the AMQP channel...
Direct connection achieved...

Try the Beta!


Typically, node.js connects to whatever it's been programmed to connect to.

you certainly can't say it typically connects to MQLight, given that node.js has existed longer than MQLight, and MQLight is not nearly as widespread as node.js...

Back to top
View user's profile Send private message
sebastia
PostPosted: Thu Jun 04, 2015 5:14 am Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

mr Jeff - ou idea "use the websockets interface of mqtt to connect to MQTT from any JavaScript runtime - Node.js for example" seems excelent to me.

First I have to study "websockets interface of mqtt", of course

Do you agree this is a good starting point
>>> http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc31741_.htm

... or you do have a better one ?

I am a person who needs a running sample to settle everyting at start, the "hello world", as I come from the Pascal world, where this approach was first used (as far as I remember).

And there is a question I have to say :
do you think IBM will continue with MQTT ?
I have read something of MQTT being dropped in favour of MOSQUITTO, this one being "open source".

In this case I have to study "websockets interface to mosquitto", right ?

In the URL
>>> http://mosquitto.org/
I find ...

===
Version 1.4 released
Wednesday, February 18th, 2015
Websockets support in the broker.
===


Thanks. Sebastian.
Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Thu Jun 04, 2015 5:26 am Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

mr Saper - correct me if I am wrong, but I understand tha MQlight does NOT provide connection to "classic MQ".

But in your URL
>> https://www.ibm.com/developerworks/community/blogs/messaging/entry/mq_support_for_mq_light_beta_now_available?lang=en

... it says :

===
The beta function allows you to deploy applications that your developers have written using MQ Light, against an existing MQ network.
===

This line is not easy to understand.

It says "deploy applications againt an existing MQ network",
(maybe apps use mq net to send/rcv "mqlight messages related to mqlight objects only)

... but it DOES NOT SAY
"those applications can access old standard MQ objects" ...

Anyway, thanks for the pointer - I shall test it.

Sebastian almost always reads ALL the post, as the words of clever people that spend some time trying to help him ARE VERY MUCH APPRECIATED !!!

Back to top
View user's profile Send private message Visit poster's website
mqjeff
PostPosted: Thu Jun 04, 2015 5:35 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17191

sebastia wrote:
mr Jeff - ou idea "use the websockets interface of mqtt to connect to MQTT from any JavaScript runtime - Node.js for example" seems excelent to me.

First I have to study "websockets interface of mqtt", of course

Do you agree this is a good starting point
>>> http://www-01.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/bc31741_.htm


No, that's really specific to MessageBroker.
sebastia wrote:
... or you do have a better one ?


This seems good:

http://oliversmith.io/technology/2011/01/29/node-js-mqtt-and-websockets/

It talks about connecting to mosquito, but mqtt is mqtt is mqtt... You can replace mosquito with an MQTT bridge in MQ - or even better use a MessageSight virtual machine... to connect to MQ itself.

sebastia wrote:
And there is a question I have to say :
do you think IBM will continue with MQTT ?


I can not overemphasis this.

MQTT is at the heart of several of IBM's key strategic initiatives.

If IBM drops MQTT, or does not continue with it, it will because something has drastically changed.

MQTT is to a large degree the future of IBM. It is particularly behind all of the strategy on the Internet of Things and the IBM Internet of Things Foundation (IOTF).

sebastia wrote:
I have read something of MQTT being dropped in favour of MOSQUITTO, this one being "open source".


MOSQUITO is an MQTT broker. It's not a protocol. You would use it instead of the MQ bridge or MessageSight or any other messaging server that supports MQTT. But MessageSight in particular has a lot more features... (I may be biased here... )
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum IndexIBM MQ API Supportnode.js access to MQ API
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.