How to consume and publish EDA created in Event portal Designer

Muni
Muni Member Posts: 3

Hi Community,

I have started to learn solace pub sub. First I have tried to create Queues in Event broker and using AMQP protocol I am able to publish and subscribe. No issues with this.



But I have tried to create Application in event designer and added the event to environment. Now I am not sure how to publish and consume this event. Do you have any blogs for this how to do it.



Comments

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 634 admin

    Hi @User, welcome to the Community. That's quite the creative username you've got there..! 😉

    Ok, so you've designed an app and an event and a schema in Event Portal. Cool. But you still have to code it. You can download the AsyncAPI schema for your application (you'll find it in the "dot dot dot" menu), and from there you can use a number of different code generators to build a working skeleton app. There is (not yet) no magic way of just designing an app in Event Portal and then just deploying it as a running instance. I think we're working on that though.

    Did you try following the various tutorials and sample data in the Event Portal? https://github.com/SolaceLabs/event-portal-samples

  • Muni
    Muni Member Posts: 3

    Hi Aron,

    Thanks. All the references I find is all about creating app. Is there any sample code which is consuming AsyncAPI? java or python.

    What would be the user credentials to consume this?

    I am quite new to soalce and bear with me the basic question. Why do we have two options (event portal and event broker) to design a EDA?


    Apart from viewing EDA graphically what difference does it make creating EDA in Event portal. Actually if we design in pub sub event broker, even rest clients can call this.

    What would you suggest for new comer? Should one spend time and design and learn EDA first with event broker instead of event portal.

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 538 admin

    Hey @Muni - you are asking all the great and valid questions when it comes to being new to EDA! First off, welcome to the Solace Community.

    I would like to step back and take a higher perspective on EDA before addressing your questions. When it comes to building and using APIs in general (whether asynchronous Event APIs or synchronous REST APIs) you should take into account two main aspets: Design-Time and Run-Time. In an extremely simplified manner:

    Design Time: This involves all the activities and tooling required to design, govern, document, collaborate, share, expose, and manage your APIs. For example, API Portals in the REST API world fit in this category

    Run Time: This involves all the activities and tooling required to actually run and interact with your APIs. For example, in the REST API world this would be an API Gateway.

    To read more about this check out this blog https://solace.com/blog/api-management-event-management/

    Now from an EDA perspective, you can think of the Event Portal (EP) as your design time component where you can design your event driven architecture. And the Event Broker as your run-time component of the EDA system where event streaming and data movement (i.e. pub/sub) occurs. Note: Pub/Sub is one of many message exchange patterns in EDA!

    It is important to note that while the Event Portal is primarily used (and promoted) as a design time tool for EDA, it is envisioned to be more than that. We are on the path to closing the loop between design and run time through the introduction of Discovery and Audit in EP that will marry the two worlds together. Infrastructure provisioning of the broker from the the portal is also on the roadmap.

    Another way to marry the two worlds of design and run time in EDA is what @Aaron mentioned --> through the use of AsyncAPI you can install application specification from EP and use code generators to translate your designed spec file to a runnable runtime application. A simple google and YouTube search will expose a good amount of resources on AsyncAPI, code generation, and other details that will help. To relate this to the REST world, AsyncAPI to EDA is what OpenAPI is to REST. There are alot of talks and resources on Youtube that will help with explaining those concepts as well.

    Hopefully this helps with clearing out some of the confusion you had and get you on the right path for your EDA journey!

    P.S. you might also find this blog post useful if you are a developer new to EDA https://solace.com/blog/developer-guide-event-driven-development/