Code Monkey home page Code Monkey logo

rabbitmq-experiments's Introduction

Some useful commands:

Experiments:

Production checklist recommended by Rabbitmq: https://www.rabbitmq.com/production-checklist.html

Additional Important links:

Create admin user on rabbitmq

  • rabbitmqctl add_user
  • rabbitmqctl set_user_tags administrator
  • rabbitmqctl set_permissions -p / "." "." ".*"

Setup:

  • installation :brew install rabbitmq
  • start server: brew services start rabbitmq
  • Server location: /usr/local/opt/rabbitmq/sbin/rabbitmq-server

For issue: "Error: Failure while executing; git config --local --replace-all homebrew.private true exited with 1." Refer this link: https://saurabhbuddha.blogspot.com/2018/10/rabbit-mq-issues-and-fixes-setup-issue.html

Important points about rabbitmq:

  • It accepts, stores and forwards binary blobs of data โ€’ messages.
  • Producing means nothing more than sending. A program that sends messages is a producer
  • A queue is the name for a post box which lives inside RabbitMQ. Although messages flow through RabbitMQ and your applications, they can only be stored inside a queue. A queue is only bound by the host's memory & disk limits, it's essentially a large message buffer. Many producers can send messages that go to one queue, and many consumers can try to receive data from one queue.
  • Consuming has a similar meaning to receiving. A consumer is a program that mostly waits to receive messages
  • Producer, consumer, and broker do not have to reside on the same host; indeed in most applications they don't. An application can be both a producer and consumer, too.
  • RabbitMQ speaks AMQP 0.9.1, which is an open, general-purpose protocol for messaging. There are a number of clients for RabbitMQ in many different languages
  • In RabbitMQ a message can never be sent directly to the queue, it always needs to go through an exchange.
  • When a consumer (subscription) is registered, messages will be delivered (pushed) by RabbitMQ using the basic.deliver method. The method carries a delivery tag, which uniquely identifies the delivery on a channel. Delivery tags are therefore scoped per channel.
  • Depending on the acknowledgement mode used, RabbitMQ can consider a message to be successfully delivered either immediately after it is sent out (written to a TCP socket) or when an explicit ("manual") client acknowledgement is received. Manually sent acknowledgements can be positive or negative and use one of the following protocol methods:
    basic.nack is used for negative acknowledgements (note: this is a RabbitMQ extension to AMQP 0-9-1)
    basic.reject is used for negative acknowledgements but has one limitation compared to basic.nack
    

Important Pika(python library for interacting with rabbitmq) commands:

  • Installing pika: pip install pika
  • Establish a connection with RabbitMQ server:
    #!/usr/bin/env python
    import pika
    
    connection = pika.BlockingConnection(pika.ConnectionParameters('localhost'))
    channel = connection.channel()
    
  • Create a queue to which the message will be delivered, Creating a queue using queue_declare is idempotent โ€’ we can run the command as many times as we like, and only one will be created.
    channel.queue_declare(queue='<queue name>')
    

Tracelog setup imp links:

rabbitmq-experiments's People

Contributors

saurabhprakash avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.