Announcement

Collapse
No announcement yet.

TCP Listener disable every 15 minutes, is it possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TCP Listener disable every 15 minutes, is it possible?

    I'm receiving a lot of messages and the source can't change the timing but we only need to see the messages every 15 minutes and nothing inbetween. Is it possible to setup the listener to accomplish this and completely ignore all the messages outside of that window? So maybe 15 minutes off and then 1-2 minutes on and repeat.

  • #2
    You can call Mirth’s own API from other channels to cycle the channel on and off.

    What is your used case such that you have to stop receiving messages for a period of time? I’ve never heard of something like that.
    Diridium Technologies, Inc.
    https://diridium.com

    Comment


    • #3
      Open the "Client API" from the menu on the left. See "Channel Status Operations". You can also NOT use the API and use native controller methods.
      pacmano
      Mirth Guru
      Last edited by pacmano; 11-27-2021, 02:15 PM.
      Diridium Technologies, Inc.
      https://diridium.com

      Comment


      • #4
        Thank. I'll try it out tonight.

        Comment


        • #5
          I can't seem to get it to call the api correctly. Nothing appears to be happening.

          Comment


          • #6
            So are we supposed to guess what you called? How you called it? Errors you saw?

            It works fine for me from the swagger test page.

            In curl:

            curl -X POST "https://192.168.65.218:8443/api/channels/_stop?returnErrors=true" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "channelId=9cee1cba-bd4c-4433-ab90-442e247e228f"
            pacmano
            Mirth Guru
            Last edited by pacmano; 11-29-2021, 12:51 PM.
            Diridium Technologies, Inc.
            https://diridium.com

            Comment


            • #7
              You can also use ChannelUtil from the User API to start and stop channels. I'm also curious why you would do this. Most senders would queue up the messages they aren't able to send you while the channel is down, and then blast them all to you when the connection is reestablished. You'll likely end up with the same amount of messages.

              If you just want to blindly ignore messages for given periods of time, you can probably set up a filter that allows or rejects messages based on the current time.

              Comment

              Working...
              X