Configuring subscribing event processor - spring application fails to start

Greetings,

We are evaluating subscribing event processor with kafka as the event source and postgres as the event store, without the Axon server.

We observed that with the subscribing event processor configuration, the application is not starting and failing with UnsatisfiedDependencyException. The service is not able to instantiate the “commandBus” bean.

I have created a project by extending the axon-kafka-example (branch evaluate-sep, https://github.com/dharanikumarp/axon-kafka-example/tree/evaluate-sep) and shared for your reference. I have taken the latest Axon-kafka-extension (https://github.com/AxonFramework/extension-kafka) by specifying the source dependencies in “settings.gradle” file.

I have also followed the steps mentioned in the documentation (https://docs.axoniq.io/reference-guide/extensions/kafka#consuming-events-with-a-subscribable-message-source)
to create a configuration class for the beans “KafkaMessageSourceConfigurer”, “SubscribableKafkaMessageSource” and the method “configureSubscribableKafkaSource”.

The exception stack trace is attached.

Is there any properties that are missing in the application.yaml or any beans in the configuration class?

Thanks & Regards,
Dharani Kumar

consumer_exception_stacktrace.txt (11.5 KB)

Hi Dharani,

Firstly, good to see somebody is starting to use the RC3 of the Kafka extension!
Lot of (my) blood, sweat & tears went into making all the current adjustments, so pleased to see those weren’t in vain.

Now, to your problem at hand though.
To be honest, it’s easier for us if you share your exact application properties and configuration classes instead of the GitHub repository, as diving in to your project also takes time.

Added, if you’ve read the new documentation you should be aware that a SubscribingEventProcessor can now be defined for the producer and consumer side of a Kafka extension.
Which of the two, or both, is set, isn’t clear from your description.

Regardless, the stack trace points to a method and parameter which do not occur in the framework project anywhere.
The commandBus should typically always be visible though, so it’s strange nonetheless.

Let me ask you two things:

  1. Does the exception not occur if you are not using Subscribing Event Processors?
  2. Please be more specific in what class this exception originates from, by sharing that code directly instead of your entire repository.

Cheers,

Steven van Beelen

Axon Framework Lead Developer

AxonIQ

twitter-icon_128x128.png

Hi Steve

Thanks for your response.

I am about to update this post today. I was able to get over the exception yesterday. I referred to the example project inside the extension and tried few configuration changes.

I will share the details here soon

Regards