Objective-C wrapper for rabbitmq-c.
- Xcode Subproject
- Cocoapods
- dependency on Pod 'rabbitmqc' - rabbitmq-c.
- if you do not use cocopads you need add rabbitmq-c (currently version 0.6.1 for all architectures armv7, arm64, x86_64 and i386)
platform :ios, '7.0'
pod "OLRabbitMQ", "~> 0.0.2"
OLRabbitMQSocket _socketAMQP = [[OLRabbitMQSocket alloc] initWithIp:<address ip> port:<port>];
[_socketAMQP createSocketWithVhost:<vhost> login:<login> password:<password> callback:^(BOOL ready, NSError *error) {
// your implementation...
}];
OLRabbitMQExchange *exchange = [[OLRabbitMQExchange alloc] initWithSocket:<OLRabbitMQSocket instance>];
[exchange bindExchange:<exchange string name> routingKey:<exchange routing key string>];
OLRabbitMQExchange *exchange = [[OLRabbitMQExchange alloc] initWithSocket:<OLRabbitMQSocket instance>];
[exchange unbindExchange:<exchange string name> routingKey:<exchange routing key string>];
[exchange basicConsume];
OLRabbitMQOperation *operation = [[OLRabbitMQOperation alloc] initWithSocket:<OLRabbitMQSocket instance>];
operation.delegate = self;
[[NSOperationQueue new] addOperation:operation];
- (void)amqpResponse:(NSData *)data routingKey:(NSString *)routingKey;
Please remember you cannot share a socket 'OLRabbitMQSocket'. The OLRabbitMQ use librabbitmq-c. The librabbitmq library is built with event-driven, single-threaded applications.
- librabbitmq-c with SSL
2015 (C) Copyright Open-RnD Sp. z o.o.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.