Skip to content

[Messenger][RFC] Improve Messenger to support other app consuming/recieving the message #33912

Closed
@tristanbes

Description

@tristanbes

Description

Hello,

I'm a new user of Messenger; Thank you to all contributors of this promising component; Yet, it gave me a hard time to solve some basic problematics.

Example

Let's say you have 2 different Symfony applications.

The application A (big, monolithic) is responsible of publishing the message to the queue using messenger. Until here, it's ok, everything is covered by the doc.

Then the queue (Amazon SQS/SNS) triggers a new Lambda execution, passing the message to the function (which is a SF Application B, responsible of generating a PDF); This behaviour is specific to Amazon, but it can be generalized of "messages can be pulled or pushed".

bP6zZi8m48HxFyKerL7m0XGeeJwA8nNbGZOXuhms_k4kz_Gi5CW297IDLvPtlfdrrZ5HIDb-O-k3-yKgnr4uHcpOkv2YgTh9zaucDDwZgJ1Vecei_Jb1-zLM2xGitIW3hAfeO5m10zPwOnau6DgdyKo9yK0ofkJSk9zaTnsXpw8QVVWe5QlP2xFa2luxkJg-Qy7yQRxx9D3IHUneVopySSgS6MCFaYaThk5-WjFpGDwpH6DC

The problematic

A. On all examples on the doc, you assume that the consumer is the application that put the message in the queue itself;

But what if it's not the case ? What if it is another Symfony (smaller) project, responsible of generating the PDF only ? What if it's another language ? (JS ?).

B. The Messenger component sends the messages with some namespace inside;

So if your message class lives in App\AwesomeBundle\Message\PdfMessage in application A, and App\Message\PdfMessage in application B, then application B won't be able to decode the Message;

C. What if the message is not pulled by the messenger component itself, but somhow is recieved (pull vs pushed) ?


I achieved this scenario, and here's what helped me:

Do you think some of these problematic are generic enough to be covered by the component code or by the documentation ?

Thank you :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureMessengerRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions