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

Parameters in channel address not used #722

Open
dankar opened this issue Feb 14, 2024 · 3 comments
Open

Parameters in channel address not used #722

dankar opened this issue Feb 14, 2024 · 3 comments
Labels
bug Something isn't working stale

Comments

@dankar
Copy link

dankar commented Feb 14, 2024

Describe the bug

I have an MQTT protocol specification (asyncapi 3.0.0) which uses parameters in the addresses. These seem to be ignored by glee when it subscribes to the topics.

How to Reproduce

Create receive channel as follows:

channels:
  createUser:
    address: createUser/{userId}
    messages:
      createUser:
        payload:
          type: object
          properties:
            name:
              type: string
    parameters:
      userId:
        $ref: '#/components/parameters/
components:
  parameters:
    userId:
      examples: ['test']

What happens is that glee will subscribe to the topic 'createUser/{userId}' (literally).

Expected behavior

I guess it's open for debate what the expected behaviour should be, but I expect something along the lines of:

  1. glee subscribes to 'createUser/+' where + is a wildcard accepting any value
  2. glee provides the value for userId as parameter to the handler function.

Or optionally: some sort of call to enable subscriptions to a channel with a specific parameter value supplied.

Additionally, there seems to be no mechanism for sending a message to a channel which has parameters in the address. Maybe that should be another bug, but it's a bit moot at the point since it seems like the specified address is ignored when sending message on a channel (#721)

@dankar dankar added the bug Something isn't working label Feb 14, 2024
@KhudaDad414
Copy link
Member

@dankar. that makes sense. can you open a PR adding this functionality?

@dankar
Copy link
Author

dankar commented Mar 20, 2024

@KhudaDad414 I don't know the code base of this project enough to do this myself at this point. But if I get around to it some day, I will of course open a PR.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴

It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.

There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.

Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.

Thank you for your patience ❤️

@github-actions github-actions bot added the stale label Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

2 participants