Skip to content
/ logc Public

Message router with internal thrift transport. Just an experiment.

License

Notifications You must be signed in to change notification settings

acceso/logc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple message router that relays messages between different protocols.

The protocols are implemented as plugins and there are three types:

  • handlers: for message reception. Ex. a TCP client.
  • listeners: for message generation. Ex. a TCP server.
  • events: send and receive messages. Just one for now: a jabber plugin.

Sample config:

---

channels:
  logger:
    class: Log
    params:
    - /tmp/sample.log
  thriftrecv:
    class: ThriftListener
    params:
    - "0.0.0.0"
    - 9998
  smtp_notif:
    class: SmtpSender
    params:
    - my.smtp.sample.com
    - This is the subject.
    - [email protected]
    - - [email protected]
      - [email protected]


routes:
  - channel: !ruby/regexp /.*/
    body: !ruby/regexp /.*/
    flags: c
    route: logger
  - channel: !ruby/regexp /^thriftrecv$/
    body: !ruby/regexp /.*/
    flags: 
    route: smtp_notif

With this configuration, the router opens a new socket on port 9998, and every thrift message will generate a new mail. A log will also be saved for every message we get.

About

Message router with internal thrift transport. Just an experiment.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published