Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examine kanin-supported AMQP commands to determine wrapper feasibility #36

Open
oubiwann opened this issue Feb 10, 2017 · 3 comments
Open
Assignees
Labels
Milestone

Comments

@oubiwann
Copy link
Member

oubiwann commented Feb 10, 2017

Possible strategy (looking at https://github.com/lfex/kanin/blob/master/include/rabbit-framing.lfe):

  • Skip all *_ok records
  • That's 77 commands that need wrapping
  • Use the kla library to automate that as much as possible

Part of epic #35

@oubiwann oubiwann added the task label Feb 10, 2017
@oubiwann oubiwann added this to the 0.7.0 milestone Feb 10, 2017
@oubiwann
Copy link
Member Author

Current usage in kanin looks like this:

(kanin:call
  (make-queue.bind
    queue example-queue
    exchange example-exchange
    routing_key example-key))

@oubiwann
Copy link
Member Author

oubiwann commented Feb 10, 2017

One possible outcome could be calls that look like this:

(kanin:queue.bind
  queue example-queue
  exchange example-exchange
  routing_key example-key))

To support "keyword" args like that, kanin:queue.bind would have to be a macro wrapping the record constructor.

@oubiwann oubiwann self-assigned this Feb 10, 2017
@oubiwann
Copy link
Member Author

A one-off macro for the queue.bind command:

(defmacro queue.bind body
  `(kanin:call
     (make-queue.bind ,@body)))

Called with:

(queue.bind queue #"myq" exchange #"myex" routing_key #"myrk")

It would be nice if record fields could have dashes converted to underscores ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant