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

Messages Not Mapping To Receiver with ClassNameRouter #401

Closed
robskrob opened this issue Mar 4, 2019 · 3 comments
Closed

Messages Not Mapping To Receiver with ClassNameRouter #401

robskrob opened this issue Mar 4, 2019 · 3 comments

Comments

@robskrob
Copy link

robskrob commented Mar 4, 2019

I'm using bernard version 0.13.0.

Whenever a publish this message to the queue for consumption, I am seeing this error:

[bernard] caught exception Bernard\Exception\ReceiverNotFoundException::No receiver found for class "Bernard\Message\PlainMessage". while processing UpdateMacroCollection.

What's wrong with how I'm mapping messages to their receivers?

I was able to get everything working using dev-master but I did not like the idea of deploying code on a version like dev-master which is subject to change (seeing as I think it represents the latest?)

@robskrob
Copy link
Author

robskrob commented Mar 4, 2019

OK I figured it out. Where I was using ClassNameRouter I used SimpleRouter instead.

As a side, I am a little confused as to what an Envelope is. It looks like ClassNameRouter has a dependency on Bernard\Envelope. Moreover when I visit the docs the only place where I see anything about an Envelope mentioned is here:

It is also possible to get the queue directly from the queue factory and push the message there. But remember to wrap the message in an Envelope object.

Of course to figure out how to wire things together, I've been sifting through the source. I still cannot seem to grasp what the purpose and over all context of an Envelope is. Can someone expand on what an Envelope is, why it's used and how to use it?

@henrikbjorn
Copy link
Contributor

Envelope is a wrapper around your custom Message classes. An Envelope contains metadata about the message and is an internal thing.

@robskrob
Copy link
Author

robskrob commented Mar 5, 2019

@henrikbjorn thank you for your reply and good to hear it's mainly an internal interface -- not to be used by users of your library.

@robskrob robskrob closed this as completed Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants