Using to axon gateways from within an axon server plugin

Yes, this sounds crazy … but would it be possible? Could I have an cqrs/es app running “inside” the axon server (aggregate, in memory projection, query gateway?) … use case: for the avro serialization we need a central schema registry and it is tempting to let the axon server cluster that is present anyway handle this instead of running another app …

I guess setting up the app isn’t that hard, but what about configuration? is it just “localhost” or do I have to access the server config to connect?

Any ideas?

Jan

1 Like

It has certainly not been designed with this feature in mind. But that doesn’t mean it won’t work.

These plugins run in an OSGi container, so not all classes you may need will be accessible for the plugins. You would have to package everything you need inside the bundle, or be available as bundle dependencies.

To connect to Axon Server from within a plugin, you would still need to connect to one of the admin nodes first. Using “localhost” may work if all nodes in the cluster are part of the _admin context.

A word of caution, though, while it may work, we don’t know what kinds of portals to other dimensions it will open… :fearful:

1 Like