Closed msche closed 2 years ago
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))
The fix is: Parametrise J8583MessageFactory with desired party role (i.e. MessageOrigin):
new J8583MessageFactory<>(messageFactory, ISO8583Version.V1987, MessageOrigin.OTHER)
Thanks for the quick response..
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 type0x1804
(which is expected by our acquirer) but instead it creates messages of type0x1800
. I was wondering what I have done wrong of forgot to configure.