Raymond created CAMEL-24377:
-------------------------------

             Summary: Add json support to the CamelEvent
                 Key: CAMEL-24377
                 URL: https://issues.apache.org/jira/browse/CAMEL-24377
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 4.21.0
            Reporter: Raymond


I'm currently using the ErrorRegistry, where you can access a collection with 
the BacklogErrorEventMessage. This is an extension of the SPI 
BacklogEventMessage.

https://github.com/apache/camel/blob/main/core/camel-api/src/main/java/org/apache/camel/spi/BacklogEventMessage.java.

This works well because the API makes it easy to access individual data and 
metadata fields from an event, as well as the complete JSON.

However, the CamelEvent class that I use in the EventNotifier isn't as 
comprehensive and lacks JSON support. I wish that:

1. CamelEvent works similarly to BacklogEventMessage. Could they be joined into 
one SPI with extension per event type?
2. CamelEvent supports getting the event as a JSON string? It would also be 
useful to be able to get it as a JSONObject, as this would make it easy to 
extend or modify.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to