World Conquest Chronicles

World Conquest Chronicles

go-rabbitmq-utils, v1.0

The library that provides utility entities for working with RabbitMQ.

Major version. Implementing of the RabbitMQ client and utilities for message consuming.

Features

  • client:
    • options (will be applied on connecting):
      • maximal queue size (optionally);
      • queues for declaring:
        • will survive server restarts and remain without consumers;
    • operations:
      • with a connection:
        • opening;
        • closing;
      • with messages:
        • message publishing:
          • automatic marshalling of a message data to JSON;
        • starting of message consuming:
          • automatic generating of a consumer name;
        • cancelling of message consuming:
          • automatic generating of a consumer name;
  • message consumer:
    • arguments:
      • client;
      • queue name;
      • outer message handler;
    • operations:
      • message consuming:
        • starting;
        • cancelling;
      • message handling:
        • support of concurrent handling;
  • wrappers for an outer message handler:
    • acknowledger:
      • processing on success:
        • acknowledging of the message;
        • logging of the success fact;
      • processing on failure:
        • rejecting of the message:
          • with once message handling;
          • with twice message handling (i.e. once requeue);
        • logging of the error;
    • JSON message handler:
      • automatical creating of a receiver for a message data by its specified type;
      • unmarshalling of a message data from JSON to the created receiver.

Installation

Prepare the directory:

$ mkdir --parents "$(go env GOPATH)/src/github.com/thewizardplusplus/"
$ cd "$(go env GOPATH)/src/github.com/thewizardplusplus/"

Clone this repository:

$ git clone https://github.com/thewizardplusplus/go-rabbitmq-utils.git
$ cd go-rabbitmq-utils

Install dependencies with the dep tool:

$ dep ensure -vendor-only

Repository

Link: https://github.com/thewizardplusplus/go-rabbitmq-utils/tree/v1.0.

Content: code.

License: MIT.