Skip to content

An API for application endpoints for communicating with the message broker and the integrated services

Notifications You must be signed in to change notification settings

francccisss/msbq-client-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

msbq-client-api

The client side go package used with Message Broker for enabling application endpoints to communication through a message broker middleware.

Mind you this is just a small package, in a small project used for learning, it is not meant to be a fully fledged rabbitmq clone but just implementation of basic functionality.

How to use

    // Connect to the message broker using TCP
    conn, err := Connect("localhost:5671")

    // Creates a new Channel and a stream
    ch, err := conn.CreateChannel()

    // Asserts that queue exists and creates one if it doesnt then
    // registers the connection to specific message queue defined
    // defined by its route
    _, err = ch.AssertQueue("route", "P2P", false)


    // To consume and any mssages sent to the channel
    msg := ch.Consume("route")
    m := <-msg


    // For dispatching message to specific message queues
	err = ch.DeliverMessage(route, []byte(route), "P2P")

About

An API for application endpoints for communicating with the message broker and the integrated services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages