[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] Requirement Protocol.email working?



chris lau wrote:

Hi,

I have a project which requires the use of email for communication to and from the client
and I would like to use xmlBlaster to handle the messages on the server. I was looking
around on the website and found the protocol.email in the reference section but it says
"INWORK" I also noticed that in the TODO section, it says


"EMAIL support is not implemented.
The callback is already implemented."

Does this mean that xmlBlaster will not work with email?

I have a email server running on one computer and xmlBlaster on another. Will xmlBlaster be able
to pick up the messages and forward them to the subscribers?


Hi Chris,

what you want is currently not implemented, but it should be very simple to add.

I'm currently working on the email protocol driver, my work should be finished the next
14 days.


I'm extending the email callback driver for this scenario:


Email callbacks: -----------

xmlBlasterServer -(1)-> callbackMsg --> smtp-MTA --> msg -(2)-> xmlBlasterClient(Java)
xmlBlasterServer <-(2)- ACK/NAK <-- smtp-MTA <-- ACK/NAK <-(1)- xmlBlasterClient(Java)


The content or attachment based delivery / mapping is configurable and the
ACK/NAK (the UpdateReturnQos) is customizable for specific MTA firewall needs.


(1) is the smtp protocol -> javax.mail.Transport.send(javax.mail.Message)
(2.a) is the pop3 protocol (polling)
-> javax.mail.Folder.getMessages()
(2.b) or an embedded MTA (like james with a mailet plugin) with smtp (pushing)


The mails would be following the xmlBlaster scripting markup, see
http://www.xmlblaster.org/xmlBlaster/doc/requirements/client.script.html
with additional attachment support.
In the (2) case the xmlBlasterServer can have a POP3 poller protocol driver
or it can be an MTA itself (using an embedded james.apache.org MTA)
to receive instantly the mail via SMTP and a Matcher/Mailet plugin.

Your use case is:
--------------------

MTA --> POP3 --> nativeClient --> publish --> xmlBlasterServer

My use case covers more or less your use case.
If you can't wait or want your own simple solution:
What you need is a small 'proxyClient' which polls with POP3 on your MTA (on the other computer)
and publishes it into xmlBlasterServer.
This should be only some lines of code: A pop3 access with javax.mail and publishing it to xmlBlaster.
It should probably be a native client inside xmlBlaster (so you don't need to take care on the
live cycle of your proxy), see
http://www.xmlblaster.org/xmlBlaster/doc/requirements/protocol.local.html


The main thing to take care is that we use all the same converters (which should be pluggable):

org.xmlBlaster.util.MsgUnit convertToXmlBlasterMsgUnit(javax.mail.MimeMessage email);
javax.mail.MimeMessage convertToEmailMessage(org.xmlBlaster.util.MsgUnit msgUnit);


This would cover all mails containing 'connect', 'publish', 'subscribe' etc. commands
(as described in http://www.xmlblaster.org/xmlBlaster/doc/requirements/client.script.html).
Our MsgUnit can hold all xmlBlaster commands.


If you have your own email markup, you would need your own set of converters.

regards
Marcel