|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
reset message sequence number in Java |
« View previous topic :: View next topic » |
Author |
Message
|
bamboozled_by_MQ |
Posted: Thu Aug 19, 2004 3:49 pm Post subject: reset message sequence number in Java |
|
|
Voyager
Joined: 07 Jan 2004 Posts: 75
|
if I wanted to reset the message sequence number to 999 I am trying to code it like this, but it seems to keep resetting to '1'
any ideas what i'm doing wrong?
Code: |
public static int resetChannel(String channelName, PCFAgent agent) {
PCFParameter [] parameters = new PCFParameter [] {
new MQCFST (MQCACH_CHANNEL_NAME, channelName), new MQCFIN (MQIACH_MSG_SEQUENCE_NUMBER, 999)
};
PCFHashtable response = null;
try {
MQMessage [] pcfResponses = agent.send (MQCMD_RESET_CHANNEL,
parameters);
response = new PCFHashtable(pcfResponses[0]);
// assume only the one response.
if (response.isValid()) {
return 0;
}
} catch (Exception e) {
e.printStackTrace();
}
return response.getReasonCode();
}
|
thanks |
|
Back to top |
|
 |
gunter |
Posted: Fri Aug 20, 2004 1:17 am Post subject: |
|
|
Partisan
Joined: 21 Jan 2004 Posts: 307 Location: Germany, Frankfurt
|
The behavior is unexpectedfor me, but the seqno changed.
dis chstatus(channel) always shows 0 after reset and restart of the channel. If you send a message over the channel, you'll see the real seqno. _________________ Gunter Jeschawitz
IBM Certified System Administrator - Websphere MQ, 5.3 |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|