We have a situation where 800-type messages are used to re-sync the STAN, so a 0800 with a STAN=0000001 would get a reply with STAN=xxxxxx, xxxxxx being the STAN the terminal was supposed to send in first place. In those messages, we need to use a different key on 0800s but revert to the default key (i.e. 41+11) for other messages. The configuration is easy:
In a follow-up commit (https://github.com/jpos/jPOS/commit/aac64d370029b4696245722378e8ef1ca86d9138) we are also making sure that a response has actually a valid response MTI. We found situations where a host would reply a 0200 with another 0200 (in their mind that would be a 'reject', but QMUX was handling it back to the application as a response to the original 0200). Most applications validate that, but just in case, we wanted to stop it at the MUX level as a safety net.