Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make client implementation transport and codec independent #35

Closed
davidtorellineueda opened this issue Jan 11, 2019 · 0 comments
Closed

Comments

@davidtorellineueda
Copy link
Contributor

davidtorellineueda commented Jan 11, 2019

This story is about decoupling the transport and codec from the client.
The motivation for this is to write clients that can be reused for different transports and codecs by just changing the configuration.

XML changes required

Define the transportImpl and codecImpl at client xml object.

See an example below for the Fix client with quickfixj transport and codec:

            <client impl = "com.neueda.etiqet.fix.client.FixClient"
                    transportImpl = "com.neueda.etiqet.transport.qfj.QfjTransport"
                    codecImpl = "com.neueda.etiqet.transport.qfj.QfjCodec"
                    defaultConfig="${user.dir}/src/test/resources/config/client.cfg">
                    ...

Now, considering that we want the Fix client to use Rabbit MQ transport and Google Protocol Buffers codec, we could define this other client configuration:

            <client impl = "com.neueda.etiqet.fix.client.FixClient"
                    transportImpl = "com.neueda.etiqet.transport.rabbitmq.RabbitMqTransport"
                    codecImpl = "com.neueda.etiqet.transport.gpb.GpbCodec"
                    defaultConfig="${user.dir}/src/test/resources/config/client.cfg">
                    ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants