NATS with Apache Camel | Choreography design pattern| Event Driven Service

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2024

Комментарии • 2

  • @Optimusjf
    @Optimusjf 3 часа назад +1

    Excelent content. Is very good.

  • @bCool-sl5cy
    @bCool-sl5cy 4 месяца назад +1

    Hello Saggu,
    In the new version of Apache Camel, a very important until here lacking feature has been introduced: variables.
    But working with an old version: do you agree with me, that the registry may be used to save a variable?
    Let's suppose that we have a parameteised route:("CTL-ROUTE-%S") which starts an equivalent, equally parameteised, route: ("DATA-ROUTE-%S")
    In the logs we will get for example:
    CTL-ROUTE-CUSTOMER: started
    CTL-ROUTE-ORDER: started
    DATA-ROUTE-CUSTOMER: disabled
    DATA-ROUTE-ORDER: disabled
    and than the CTL-ROUTE-CUSTOMER find out that there is 1200 rows in the table CUSTOMER and therefore starts the equivalent DATA-ROUTE-CUSTOMER
    The latter route will than poll the 1200 rows from the CUSTOMER table in 100 blocks maps them and send them to a predefined jms-queue.
    Ist it possible to use here a variable customerBlockNumber with an initial value of 1 and to save it in the registry?
    This variable will be incremented by each iteration, sothat we can log the following messages:
    .log("Processing Block-Nr. {}", customerBlockNumber) // this is pseudo-code.