Tuesday, February 18, 2014

Further Tibco Notes


Sending messages from the command line

In one console, run this:

C:\Users\henphi> tibrvlisten -daemon tcp:HOST:TCP_PORT -service SERVICE_ID "testmsg"

where HOST, TCP_PORT and SERVICE_ID are values suitable for your environment.

In another console, run this:

C:\Users\henphi> tibrvsend -daemon tcp:HOST:TCP_PORT -service SERVICE_ID "testmsg" "message content"
Publishing: subject=testmsg "message content"

and you'll see the first console output:

2014-02-14: 13:46:57 (2014-02-07 13:46.57.889000000Z): subject=testmsg, message={DATA="message content}

Wildcard subjects

If you want to listen to all messages, not just those with a given subject, run:

C:\Users\henphi> tibrvsend -daemon tcp:HOST:TCP_PORT "*.>"

Automatic clustering

Instances of the Tib daemon will automatically cluster if they're on the same subnet unless you start the daemon with something like:

> rvrd -store STORE_FILE -listen TCP_PORT -logfile LOG_FILE -log-max-size 1024 -log-max-rotations 5 -no-multicast

Otherwise, you can have two listeners listening to different HOSTs and they will both receive messages.

No comments:

Post a Comment