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

Echo message type 0x1800 instead of expected 0x1804 #143

Closed
msche opened this issue Feb 7, 2022 · 3 comments
Closed

Echo message type 0x1800 instead of expected 0x1804 #143

msche opened this issue Feb 7, 2022 · 3 comments

Comments

@msche
Copy link

msche commented Feb 7, 2022

I have just started using your library and opened a connection as described in the documentation. After a while, the IdleEventHandler kicks in and starts generating echo messages to the acquirer. I was expecting it would create ISO 8583 messages of type 0x1804 (which is expected by our acquirer) but instead it creates messages of type 0x1800. I was wondering what I have done wrong of forgot to configure.

@kpavlov
Copy link
Owner

kpavlov commented Feb 8, 2022

Hi, Mark (@msche) this is because IdleEventHandler is assuming that he is the ACQUIRER:

private fun createEchoMessage(): IsoMessage {
        return isoMessageFactory.newMessage(
            MessageClass.NETWORK_MANAGEMENT, // messageClass
            MessageFunction.REQUEST, // messageFunction
            MessageOrigin.ACQUIRER // messageOrigin
        )
    }

So, it should be parameterized.
Meanwhile, you can replace it with your custom handler in the ConnectorConfigurer.configurePipeline:

pipeline.replace("idleEventHandler", "idleEventHandler", MyIdleEventHandler(isoMessageFactory))

@kpavlov
Copy link
Owner

kpavlov commented Feb 8, 2022

The fix is: Parametrise J8583MessageFactory with desired party role (i.e. MessageOrigin):

new J8583MessageFactory<>(messageFactory, ISO8583Version.V1987, MessageOrigin.OTHER)

@kpavlov kpavlov closed this as completed Feb 8, 2022
@msche
Copy link
Author

msche commented Feb 9, 2022

Thanks for the quick response..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants