I'm trying to use MessageDeliveryPayload class as substitute of the "v1" MessageSubscriptionPayload class, but I'm having issues when trying to access the type of the message, or its content, as it doesn't have a "getMessage", or a "getType", as in the v1 class, and the notificationType of the message will always be "Message"..
So, e.g., im not really able to catch/listen for events that are of 'OrderStateTransition' type, and what content/state is sent in it.
Is it possible that we have the "getMessage" added to MessageDeliveryPayload interface also?
I've also tried to use the generic Message class, that I can catch and then convert into the desired OrderStateTransitionMessage class and get its content, but however is not possible to retrieve the projectKey from it..
Should it also be accessible in this Message type?
Or is there any other way to do this?
I'm trying to use MessageDeliveryPayload class as substitute of the "v1" MessageSubscriptionPayload class, but I'm having issues when trying to access the type of the message, or its content, as it doesn't have a "getMessage", or a "getType", as in the v1 class, and the notificationType of the message will always be "Message"..
So, e.g., im not really able to catch/listen for events that are of 'OrderStateTransition' type, and what content/state is sent in it.
Is it possible that we have the "getMessage" added to MessageDeliveryPayload interface also?
v1 MessageSubscriptionPayload getMessage: https://commercetools.github.io/commercetools-jvm-sdk/apidocs/io/sphere/sdk/subscriptions/MessageSubscriptionPayload.html#getMessage--
v2 MessageDeliveryPayload : https://commercetools.github.io/commercetools-sdk-java-v2/javadoc/com/commercetools/api/models/subscription/MessageDeliveryPayload.html#MESSAGE
I've also tried to use the generic Message class, that I can catch and then convert into the desired OrderStateTransitionMessage class and get its content, but however is not possible to retrieve the projectKey from it..
Should it also be accessible in this Message type? Or is there any other way to do this?
Thanks!