-
Notifications
You must be signed in to change notification settings - Fork 111
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 request initiated from SocketQueue every 5 minutes #50
Comments
You can use the test client (https://github.com/juks/iso-8583-socket-queue#iso-host-emulation-and-self-test-clients). Just need to point to the upstream. It will send the given packages no matter it there were an exchange, but it is not a big overhead. |
I think I will add this feature and push it up to you. Would be good with this feature implemented. Just give me some directions on the following:
|
I thing a good way to start is to start with simple, then move on. The simple point could be in making some improvements to the test client, like configuration options for various packet types and fields. Now it is all hardcoded. Then provide some changeable options for the packet interval. This will do the basic job: every system administrator will be able to set the interval and the payload being sent periodicaly. The test client is here: https://github.com/juks/iso-8583-socket-queue/blob/master/lib/testSuite/lib/testClient.js. The main logic for upstreaming the data is here:
On my experience it was always accomplished by just sening this echo packet each X minutes no matter what. By the way, if the ISO host will close the connection — not a big deal, the queue will work fine, we'll reconnect, no packets will get lost. |
Yes, I think I will just add a timer and send a packet every 5 minute regardless of transactions or not. Will work something out. Thanks! |
I'm trying to access upstream socket from the host logic: File: logic/myhost.js Iso8583Logic.prototype.upstreamEcho = function(stan) {
var now = moment(new Date());
var p = new iso8583Packet();
p.setFields({
0: 1804,
3: "000000",
11: stan,
12: now.format("YYMMDDHHmmss"),
24: 831,
32: "01008600998"
});
this.upstream.socket.write(p); // <---- how do I reach socket for upstream in this function?
} /Users/xxxxx/iso-8583-socket-queue/lib/iso8583/lib/logic/myhost.js:171
this.socket.write(Buffer.concat(p));
^
TypeError: Cannot read property 'write' of undefined
at Iso8583Logic.upstreamEcho (/Users/xxxxx/iso-8583-socket-queue/lib/iso8583/lib/logic/myhost.js:171:15)
|
You can do this.upstream.sendData(this, p); |
Hi @cavebring
|
Lovely, thank you @scalpovich ! |
So I have seen the implementation of responding to echo, but not generation of echo messages to HOST (without having any client connected).
In ISO8583 93 spec:
So we have to send echo messages if no other messages is sent within 5 minutes.
New feature or something that exists that can be modified?
The text was updated successfully, but these errors were encountered: