2016-09-09 10:23:03.815 application[563:410885] message properties: (
"<RMQBasicContentType: 0x12569e410\n stringValue = @\"text/plain\">",
"<RMQBasicHeaders: 0x12566e000\n dictionaryValue =
@{@\"senderUid\": <RMQLongstr: 0x125685960\n stringValue = @\"anything\">,\n
@\"receiverUid\": <RMQLongstr: 0x1256aa150\n stringValue = @\"userId\">,\n
@\"receiverType\": <RMQSignedLong: 0x1256648f0\n integerValue = 0>,\n
@\"senderCode\": <RMQLongstr: 0x1256df400\n stringValue = @\"anycode\">,\n
@\"messageType\": <RMQSignedLong: 0x1256df7d0\n integerValue = 106>}>",
"<RMQBasicDeliveryMode: 0x125662a30\n octet = 2\n integerValue = 2>",
"<RMQBasicPriority: 0x125691be0\n octet = 0\n integerValue = 0>"
)RMQMessageHeaders *messageProp = [[RMQMessageHeaders alloc] initWithDictionary:headers];
NSArray *properties = [NSArray arrayWithObjects:messageProp, nil];
RMQQueue *q = [ch queue:@"simpleQueue" options:RMQQueueDeclareDurable];
[ch.defaultExchange publish:[@"hello world!" dataUsingEncoding:NSUTF8StringEncoding] routingKey:q.name properties:properties options:RMQBasicPublishNoOptions];This code gets no warning or error. In the runtime, i get an error of:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<RMQMessageHeaders 0x12f6b7080> valueForUndefinedKey:]: this class is not key value coding-compliant for the key flagBit.'XCode shows that there is a sorting in RMQValues.m file, uses "flagBit" which is a value in RMQBasicvalues class. Then there it's getting complicated for me. I also tried adding one more property just like "properties" value of RMQMessage class and done something about it but could not handle problem.
...
To make it more clear, how should i send these headers to a queue? If someone can help me, i'll appreciate very much.
Thank you.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
NSArray *properties = @[[[RMQBasicAppId alloc] init:@"my-app-id"], [[RMQBasicContentType alloc] init:@"text/plain"]];
[ch.defaultExchange publish:[@"Hello World!" dataUsingEncoding:NSUTF8StringEncoding] routingKey:q.name properties:properties options:RMQBasicPublishNoOptions];
After a while, is there anyone to answer my question?Thanks in advance.
--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
-[RMQBasicHeaders allKeys]: unrecognized selector sent to instance 0x15e244220
2016-10-07 10:22:50.002 MDMAgent[3799:2936619] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RMQBasicHeaders allKeys]: unrecognized selector sent to instance 0x15e244220'
*** First throw call stack:
NSDictionary *header = @{ @"numberedThing1" : [[RMQSignedLong alloc] init:int],
@"numberedThing2" : [[RMQSignedLong alloc] init:int],
@"stringThing1" : [[RMQLongstr alloc] init:@"anyString"],
@"stringThing2" : [[RMQLongstr alloc] init:@"anyString"]};
NSArray *properties = @[[[RMQBasicHeaders alloc] init:header]];
RMQQueue *q = [ch queue:q.name options:RMQQueueDeclareDurable];
[ch.defaultExchange publish:[(NSString *)messageContent dataUsingEncoding:NSUTF8StringEncoding] routingKey:self.queueName properties:properties options:RMQBasicPublishNoOptions];Thanks again.
--
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.