RabbitMQAdapter

class RabbitMQAdapter

Adapter class for convenience connection to rabbitmq. Uses the Obj-C RMQClient to connect to an configured RabbitMQ server instance

  • local host name copy from Config

    Declaration

    Swift

    var host: String!
  • local port number copy from Config

    Declaration

    Swift

    var port: Int!
  • local queue for reading copy from Config

    Declaration

    Swift

    var readQueue: String!
  • local exchange name copy from Config

    Declaration

    Swift

    var exchange: String!
  • local queue for writing copy from Config

    Declaration

    Swift

    var writeQueue: String!
  • local routing key copy from Config

    Declaration

    Swift

    var routingKey: String!
  • local user name copy from Config

    Declaration

    Swift

    var user: String!
  • local password copy from Config

    Declaration

    Swift

    var password: String!
  • Initializer with default values, so that you didn’t have to fill them all

    Declaration

    Swift

    init(hostName: String = "127.0.0.1",
             portNumber: Int = 5672,
             readQueueName: String = "meta.production.test",
             exchangeName: String = "meta.production",
             writeQueueName: String = "meta.production.testfinished",
             routingKeyName: String = "testing",
             userName: String = "guest",
             userPassword: String = "guest")
  • convenience initialisation for use with Config struct

    Declaration

    Swift

    convenience init(config: RabbitMQConfig)
  • helper method for subscribing from readQueue

    Declaration

    Swift

    func subscribe()
  • helper method for publishing to writeQueue

    Declaration

    Swift

    func publish(message: String)