Thanks to all those who helped me, I'm running a working ZeroMQ server
with many Delphi Client.
I wrote a simple OO wrapper (C API is too error prone).
This is a simple use:
//SENDER
zmq := TZeroMQ.Create;
try
ZMQ.Open('localhost');
ex := zmq.CreateExchange('E', zmqScopeGlobal, '*',
zmqStyleDataDistribution);
i := 1;
while True do
begin
message := 'Hello World';
WriteLn('sending ', message);
zmq.Send(ex,message, zmqNoBlocking);
sleep(1);
inc(i);
end;
finally
zmq.Free;
end;
//RECEIVER
zmq := TZeroMQ.Create;
try
zmq.Open('localhost');
zmq.CreateLocalQueue('MyLocalQueue');
zmq.Bind('E','MyLocalQueue');
while True do
begin
if zmq.Receive(Message, MessageType, MessageSize, zmqNoBlocking) then
WriteLn('Message: ', Message, ' - Message Data Size: ',
MessageSize);
sleep(1);
end;
finally
zmq.Free;
end;
This simple wrapper does his job.
I've some "advanced" questions about ZeroMQ, con someone help me?
1. Does exist a users management in ZeroMQ? How I can limit users able
connect to the system?
2. How works "global objects" the config file? How I can use those?
3. How I can dump server queues status? (who is connected with who)
4. What is the difference between STYLE_DATA_DISTRIBUTION and
STYLE_LOAD_BALANCING ?
5. What is queue "SWAP"? In with cases is usefull?
If you want , I can release my Delphi code to the community.
Thanks for your attention.
--
Logo bitTime* Daniele Teti
/R&D Director & Educational
/*/mobile: +39 349 6626822/
*
bit Time Software S.r.l.
*Embarcadero Representative in Italy
--------------------------------------------------------------------------
Via Matteotti, 18, 00044 -- Frascati (RM)
Tel : +39 06 97245050 Fax: +39 06 97245050
http://www.bittime.it <http://www.bittime.it/> http://www.codegear.it
<http://www.codegear.it/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090720/853a5e25/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: C:\Users\Daniele\Documents\firme_email\logo_firma.gif
Type: image/gif
Size: 1279 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090720/853a5e25/attachment.gif>