leo_mq_api

leo_mq’s API.

References

Description

leo_mq’s API

Function Index

new/2 Create a new message-queue server.
new/3  
publish/3 Publish a message into the queue.
status/1 Retrieve a current state from the queue.

Function Details

new/2

new(Id, Properties) -> ok | {error, any()}

  • Id = atom()
  • Properties = [atom()] | #mq_properties{}

Create a new message-queue server

new/3

new(RefSup, Id, Properties) -> ok | {error, any()}

  • RefSup = atom() | pid()
  • Id = atom()
  • Properties = [atom()] | #mq_properties{}

publish/3

publish(Id, KeyBin, MessageBin) -> ok | {error, any()}

  • Id = atom()
  • KeyBin = binary()
  • MessageBin = binary()

Publish a message into the queue

status/1

status(Id) -> {ok, list()}

  • Id = atom()

Retrieve a current state from the queue