we published some msgs to queue in EMS server.
we want see MSG data(content) for each msg
can you please let me know steps how to do.
Thanks
venkateshwar
You can use a java class to listen on the specified topic or queue .. I think you can find a sample code under the EMS installation .. there are a sample to send an XML file as a message .. using this command
call C:\tibco\ems\samples\java\setup
REM: Sending Queue Message
java -cp %CLASSPATH%;C:\tibco\ems\samples\java tibjmsQueueSender -queue %COMPUTERNAME%.PurchaseOrder.Batch "C:\BWEDU\BatchOrder\BatchOrder01.xml"
I hope this could help!
Related
I try to write a bash script that can read and write to tibco ems server. Is it possible? What i need to do that ?
thanks
You would need to develop a utility able to write messages to a queue and read messages from a queue. This can be done using EMS Java API. Then this utility would be called from your script.
A good starting point would be to look at the samples provided with the product in the <TIBCO_HOME>/ems/8.6/samples/java directory (look at tibjmsMsgConsumer.java and tibjmsMsgProducer.java).
i try to use solace with spring boot.
here is a demo application and the log its create:
https://github.com/GreenRover/solace_spring_multiconnection/blob/master/problem.log
I wonder about this error (INFO) message
c.s.jcsmp.impl.SessionModeSupport .... - Error Response (400) - Already Exists
Is it normal to get this message or goes something wrong?
This message indicates that a queue fails to be created because a queue with the same name already exists.
This is expected since your sample code tries to create a queue with the same name more than once. It is ok to ignore this message.
However, if you want to avoid the message, the application has to make sure that only one queue is created with the name.
I was looking to see if there are ways to collect MQ object details other than names using PCF commands. For E.g. If I would like see where a QAlias is pointing to or the Target base object, how do I generate a PCF command to accomplish this??
Use the information in the link that Morag gave you and then you need to do something like:
agent = new PCFMessageAgent(qMgrName);
request = new PCFMessage(MQConstants.MQCMD_INQUIRE_Q);
request.addParameter(MQConstants.MQCA_Q_NAME, "*");
request.addParameter(MQConstants.MQIA_Q_TYPE, MQConstants.MQQT_ALIAS);
request.addParameter(MQConstants.MQIACF_Q_ATTRS,
new int [] { MQConstants.MQCA_Q_NAME, MQConstants.MQCA_BASE_NAME });
responses = agent.send (request);
There are PCF commands that are equivalents of all the MQSC commands. So if you can do it with MQSC you can also achieve the same thing with PCF.
The MQSC command DISPLAY QALIAS(q-name) ALL can be done in PCF using the Inquire Queue command - that is MQCMD_INQUIRE_Q and providing the name of the queue you want to know about in the Queue Name MQCA_Q_NAME parameter. You can see all the returned parameters in the Knowledge Center.
Reference
Inquire Queue PCF Command
Thanks for going thru this question.
We have installed ITCAM agent on MQ V7.5.0.3. Currently we had a scenario to clean out all the MQ objects and recreate it. While configuring ITCAM agent on MQ, there were few auto-created Subscriptions on Qmgr.
While taking dmpmqcfg -m these subscriptions are not captured ( as per info center "The dmpmqcfg utility dumps only subscriptions of type MQSUBTYPE_ADMIN, that is, only subscriptions that are created using the MQSC command DEFINE SUB or its PCF equivalent. Subscriptions that are created by applications using the MQSUB MQI call of type MQSUBTYPE_API are not part of the queue manager configuration, even if durable, and so are not dumped by dmpmqcfg")
Can anyone please advise how to take dump of all the subscriptions irrespective of created by DEFINE SUB or by some API's.
Thank you
You can issue the command DISPLAY SUB(*) TYPE(API) ALL to see them all.
dmpmqcfg does not dump them out because replaying them as DEFINE SUB commands would create TYPE(ADMIN) subscriptions.
issue facing while loading the messages in to mq channel, recieving an error like below pasted
MQOPEN ended with reason code 2001
unable to open queue for output
how can i resolve this above issue,kindly can any one please advice on the same
The return code resolves as follows:
C:\>mqrc 2001
2001 0x000007d1 MQRC_ALIAS_BASE_Q_TYPE_ERROR
The Infocenter page for this return code provides the following explanation:
2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR
Explanation
An MQOPEN or MQPUT1 call was issued specifying an alias queue as the destination, but the BaseQName in the alias queue definition resolves to a queue that is not a local queue, a local definition of a remote queue, or a cluster queue. Completion Code
*MQCC_FAILED Programmer response*
Correct the queue definitions.
In other words, the queue your app is opening is an alias queue. If you are opening for input and the base queue is not a local queue, this error results. If you are opening for output and the base queue is not a local queue, a local definition of a remote queue, or a cluster queue you also get this error.
What is not mentioned in the error code above is that if the alias queue points directly to a transmit queue you also get this error. In that case what you need is a QRemote and not an alias.