James Server
  1. James Server
  2. JAMES-956

work on james-server-experimental-activemq-function

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 3.0-M1
    • Labels:
      None

      Description

      Hi,

      I'm very interested in using james with active-mq (or any other message broker) .

      My Plan is to:
      -) write an SMTP handler which replaces the current org.apache.james.smtpserver.integration.SendMailHandler and puts the message into MQ
      -) write a spool manager which listens on messages an processes them, if a message would be "moved" to a different processor, then it shall be put into a different MQ and/or distinguishable in a other way ... (don't not yet)
      -) review and extend the current active-mq stuff

      In the end I want to be able to use a bunch of james servers which are connected through a commen message broker.

      what do you guys think about this?

        Activity

        Hide
        Norman Maurer added a comment -

        We use Camel todo the JMS spooling. So the complete module was removed

        Show
        Norman Maurer added a comment - We use Camel todo the JMS spooling. So the complete module was removed
        Hide
        Norman Maurer added a comment -

        I would be in prefer to remove the whole module and just use what we have now in spoolmanager module (using camel + activemq).

        Thoughts ?

        Show
        Norman Maurer added a comment - I would be in prefer to remove the whole module and just use what we have now in spoolmanager module (using camel + activemq). Thoughts ?
        Hide
        Norman Maurer added a comment -

        Hi Mario,

        I committed my code related to jms spooling today. Its using camel to send to the jms queue (See James.java). From there camel us used to move the mail from one queue to the other (I'm using one queue per processor listed in spoolmanager.xml). Not sure if this helps you.

        All code related to this is located in the spoolmanager folder. I'm currently lookin into ways to make it more performant. At the moment I store the whole Mail object in the JMSMessage as Object (including the whole MimeMessage). Thats ok for small messages but its not a good idea for bigger stuff. I think we should to refactor it to move as less data as possible. Many mailets / matchers don't need to access the MimeMessage at all so there is no need to load it. At the moment I think about using BlobMessage or StreamMessage for make it more performant. But I have to think about it.

        Feedback welcome

        Show
        Norman Maurer added a comment - Hi Mario, I committed my code related to jms spooling today. Its using camel to send to the jms queue (See James.java). From there camel us used to move the mail from one queue to the other (I'm using one queue per processor listed in spoolmanager.xml). Not sure if this helps you. All code related to this is located in the spoolmanager folder. I'm currently lookin into ways to make it more performant. At the moment I store the whole Mail object in the JMSMessage as Object (including the whole MimeMessage). Thats ok for small messages but its not a good idea for bigger stuff. I think we should to refactor it to move as less data as possible. Many mailets / matchers don't need to access the MimeMessage at all so there is no need to load it. At the moment I think about using BlobMessage or StreamMessage for make it more performant. But I have to think about it. Feedback welcome
        Hide
        Norman Maurer added a comment -

        Thx again Mario for the feedback.

        I will commit the changes related to camel in the meantime.. Maybe this gives you some idea about it..

        Bye,
        Norman

        Show
        Norman Maurer added a comment - Thx again Mario for the feedback. I will commit the changes related to camel in the meantime.. Maybe this gives you some idea about it.. Bye, Norman
        Hide
        Mario Zsilak added a comment -

        Hi,

        I'm still working on this, however I'm not so sure how it will work together with camel.
        And anyway ... still didn't got response from the management. I try to push on that.

        Kind regards,
        Mario

        Show
        Mario Zsilak added a comment - Hi, I'm still working on this, however I'm not so sure how it will work together with camel. And anyway ... still didn't got response from the management. I try to push on that. Kind regards, Mario
        Hide
        Norman Maurer added a comment -

        Hi Mario,

        I have now a proof of concept for using camel for the matcher/mailet processor workin ( I will commit it soon), so it should be really straight forward to replace the current used consumer and producer with JMS. So my next task after the code is committed and maybe a bit cleanup is done, would be to target the jms spooling. Is there still some interest by you to work on this ? Just so we don't try to tackle the same stuff

        Bye,
        Norman

        Show
        Norman Maurer added a comment - Hi Mario, I have now a proof of concept for using camel for the matcher/mailet processor workin ( I will commit it soon), so it should be really straight forward to replace the current used consumer and producer with JMS. So my next task after the code is committed and maybe a bit cleanup is done, would be to target the jms spooling. Is there still some interest by you to work on this ? Just so we don't try to tackle the same stuff Bye, Norman
        Hide
        Norman Maurer added a comment -

        Hi Mario,

        thx for the info. Every feedback or suggestions howto make james more useable or extensible is really welcome.

        Hope the push works out

        Cheers,
        Norman

        Show
        Norman Maurer added a comment - Hi Mario, thx for the info. Every feedback or suggestions howto make james more useable or extensible is really welcome. Hope the push works out Cheers, Norman
        Hide
        Mario Zsilak added a comment -

        Hi Norman,

        Yes I already started it. The issue is the following:

        We want to use a very customized version of james for one of our customers. AFAIK the management is not sure about the legal stuff and anyway the customer didn't decide to order a mail system yet from us.

        Anyway if everything is OK, some colleagues and me would do the needed customization. All involved developers agree that we will give everything that is usefull back to the james community, however this has also to be decided by the management

        Kindly give me a few more days, so I can try to push the management to the right decision

        Show
        Mario Zsilak added a comment - Hi Norman, Yes I already started it. The issue is the following: We want to use a very customized version of james for one of our customers. AFAIK the management is not sure about the legal stuff and anyway the customer didn't decide to order a mail system yet from us. Anyway if everything is OK, some colleagues and me would do the needed customization. All involved developers agree that we will give everything that is usefull back to the james community, however this has also to be decided by the management Kindly give me a few more days, so I can try to push the management to the right decision
        Hide
        Norman Maurer added a comment -

        @Mario: Did you already start to work on this ? Maybe it worth to start some thread on server-dev ? I really would like to get this integrated for james and so try to assist you (Even if my jms vodoo is limited)

        Show
        Norman Maurer added a comment - @Mario: Did you already start to work on this ? Maybe it worth to start some thread on server-dev ? I really would like to get this integrated for james and so try to assist you (Even if my jms vodoo is limited)
        Hide
        Norman Maurer added a comment -

        Using JMS for spooling is something I really would like to see in james for a long time. Nice to see someone seems to have the cycles to work on it .. Go ahead

        Show
        Norman Maurer added a comment - Using JMS for spooling is something I really would like to see in james for a long time. Nice to see someone seems to have the cycles to work on it .. Go ahead
        Hide
        Mario Zsilak added a comment -

        nice point!
        I didn't thought about that one

        IMO this is also related to the current mailing list discussion with the subject "Moving mails around (Was: MailRepository and MailboxManager)", because (as far as I understood it) if we will have some kind of central "MailRepository" which can be accessed via POP / IMAP; we will probably also do this seperation of META-Information and Content.

        I'm still a newbie in terms of mail concepts (from server view) and the according protocols, but I'm very interested in learning this stuff and contributing to james.
        So I guess I'll do some simple/abstract MQ integration for now and change the code when there is some outcome ( = code that I can reuse ) to the discussion.

        Show
        Mario Zsilak added a comment - nice point! I didn't thought about that one IMO this is also related to the current mailing list discussion with the subject "Moving mails around (Was: MailRepository and MailboxManager)", because (as far as I understood it) if we will have some kind of central "MailRepository" which can be accessed via POP / IMAP; we will probably also do this seperation of META-Information and Content. I'm still a newbie in terms of mail concepts (from server view) and the according protocols, but I'm very interested in learning this stuff and contributing to james. So I guess I'll do some simple/abstract MQ integration for now and change the code when there is some outcome ( = code that I can reuse ) to the discussion.
        Hide
        Stefano Bagnara added a comment -

        This is something that IMO could be integrated as a core feature if you contribute it.

        It is very interesting, expecially if you add that the "enveloper informations" (Mail/MailImpl fields) could be stored separately from the message content (MimeMessage object). So maybe a JCR to store the content, JMS (or directly ActiveMQ) to move/alter the envelope around. Otherwise if you use persistent queues you would end up "cloning" the whole message at each processor change.

        Show
        Stefano Bagnara added a comment - This is something that IMO could be integrated as a core feature if you contribute it. It is very interesting, expecially if you add that the "enveloper informations" (Mail/MailImpl fields) could be stored separately from the message content (MimeMessage object). So maybe a JCR to store the content, JMS (or directly ActiveMQ) to move/alter the envelope around. Otherwise if you use persistent queues you would end up "cloning" the whole message at each processor change.

          People

          • Assignee:
            Norman Maurer
            Reporter:
            Mario Zsilak
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development