[EMAIL PROTECTED] wrote:
Hello Ted/Carl,
Could you please reply the following email? I am struck with the
Method Request (AM1M) (mapping for setAttribute() and method request
e.g. echo) and Method Response (AM1m).
Just wanted to remind you about this email.
Thank you in advance.
Best Regards,
Rahul
Sending the Method Request here. I believe this should be like this...
// send method request AM1M
case 5:
// just to verify that what objectID i am getting is correct
System.out.println(mgtclient.objectID);
mgtclient.opcode="AM1M";
mgtclient.sequenceNo=999;
mgtclient.methodName="purge";
message.clear();
try {
message.put(mgtclient.opcode.getBytes("UTF-8"));
message.putInt(mgtclient.sequenceNo);
message.putLong(mgtclient.objectID);
encoder.writeStr8(mgtclient.methodName);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
System.out.println("Query Method Request Sent for purge method
of ueue class...");
break;
Trying to receive the Method Response here...
case 'm':
// TODO: this message is not printing... NOT receiving the Method
Response
System.out.println("I am in");
int statusCode=decoder.readUint16();
String statusText=decoder.readStr8();
System.out.println(statusCode);
System.out.println(statusText);
break;
-->> I dont know what went wrong here... Why I am not able to receive
the Method Response(AM1m)
In your transmit code above, I don't see where you actually send the
message. You encode the message then print a line saying it was sent
but I don't see where you set attributes and send the message. What
routing key are you using?
If you turn tracing on in the broker (-t command line switch), do you
see the AM1M message being received?
-Ted