Giter Club home page Giter Club logo

Comments (8)

KhudaDad414 avatar KhudaDad414 commented on August 19, 2024

Also, is very frequent in organizations not to have a dedicated Broker for each environment, and that the channel address depends on the environment.

Hey @ivangsa, can you explain this a little more? 🙏

from glee.

ivangsa avatar ivangsa commented on August 19, 2024

In the last two organizations I worked there is one Kafka Broker for PRO and another shared one for Staging, Integration and Dev

so topics in the shared broker can not use just the same topic name as in PRO, because there would be more than one, so we use a naming convention:

given an asyncapi.yml like:

channels:
  CustomerEventsChannel:
    address: "customer.events"

Topics would follow a naming convention similar to this one:

  • PRO: customer.events
  • PRE: customer.events.pre
  • DEV: customer.events.dev

Hope this clarifies the point.

from glee.

fmvilas avatar fmvilas commented on August 19, 2024

Topics would follow a naming convention similar to this one:

PRO: customer.events
PRE: customer.events.pre
DEV: customer.events.dev

I think you should be able to solve that if your channel address becomes something like customer.events.{environment}. However, this would match customer.events.pre and customer.events.dev but not customer.events. My recommendation is that we don't do any hack on Glee to add stuff to the addresses but instead rely on the AsyncAPI file definitions. If these addresses exist, they should be reflected in the AsyncAPI document and their channels associated with specific servers (like dev or pre).

from glee.

ivangsa avatar ivangsa commented on August 19, 2024

ok, thanks @fmvilas

if I understood, the {environment} value can be defined for glee using environment variables, like:

GLEE_SERVER_VARIABLES=pre:environment:.pre

(this would set environment=.pre for the pre server, mind the dot in .pre)

I hope this empty value GLEE_SERVER_VARIABLES=pro:environment: would work also for pro

This would definitely solve that part.

from glee.

eelcofolkertsma avatar eelcofolkertsma commented on August 19, 2024

Can we have both honored?

Many organizations differentiate between production, and various integration environments (yes!)
Be spec driven: async api spec should support environment differentiation either at server-level or at addressing-level

How about channel address=customer.events{environment} and environment=.pre|.sta|. Empty for environment than is production

from glee.

eelcofolkertsma avatar eelcofolkertsma commented on August 19, 2024

I am not an experienced developer, but if you feel this is an easy bug I am happy to dive into the mud. Please advise

from glee.

eelcofolkertsma avatar eelcofolkertsma commented on August 19, 2024

Same issue is reported as #721

from glee.

KhudaDad414 avatar KhudaDad414 commented on August 19, 2024

closing since it's a duplicate of #721

from glee.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.