As far as I understand an “error” would be a message, so that lives in the 
application layer and you need to wrap it.

I’ve had success with the rbczmq ruby bindings wrapping objects as JSON, such 
as:

{“status”:”success”,”result”:”some result here”} or 
{“status”:”error”,”message”:”description of error”}

Same concept really as a JSON web api might have, except you get to skip the 
HTTP layer and use ZMQ messaging patterns.

-Matt

On 29 Aug 2013, at 9:41 am, Gonzalo Vásquez <gvasq...@altiuz.cl> wrote:

> Is there any explicit way to signal an error response in zmq? I'm using Java 
> (jeromq).
> 
> I'm aware that I could serialize and send a wrapper object around the actual 
> Message needed to be sent, and use some object flags to signal success/error, 
> but I'd like to know if something like this is already supported in the API.
> 
> Thanks!
> 
> Enviado desde mi iPhone
> 
> El 28-08-2013, a las 19:32, MinRK <benjami...@gmail.com> escribió:
> 
>> 
>> 
>> 
>> On Sun, Aug 25, 2013 at 1:53 PM, Pieter Hintjens <p...@imatix.com> wrote:
>> Failed authentication should cause the socket to be closed. We'll take
>> a look at this. Thanks for catching it.
>> 
>> Thanks. By closed, you mean the connecting peer (client) should be closed, 
>> or the inner pipe on the server side?  What should be the user-visible 
>> symptoms of failed authentication, both on the client side and the server 
>> side, if any? I'm looking to add a failed-auth test to test_security, but it 
>> is unclear to me what the expected behavior is.  Is the symptom only that 
>> messages sent do not arrive, or should sending a message not succeed in the 
>> first place?
>> 
>> -MinRK
>> 
>> 
>> On Sun, Aug 25, 2013 at 8:51 PM, MinRK <benjami...@gmail.com> wrote:
>> > Hello,
>> >
>> > I'm working on [adding support](https://github.com/zeromq/pyzmq/pull/401)
>> > for 3.3 bits in pyzmq, and I'm testing the authentication mechanisms.  I
>> > translated the [security
>> > test](https://github.com/zeromq/libzmq/blob/master/tests/test_security.cpp)
>> > to Python and it ran just fine.  However, when I checked to confirm that it
>> > actually did something, I changed the password to be incorrect - and the
>> > test *still* ran fine.  This means that ZMQ_PLAIN authentication actually
>> > has no effect, and failed authentication doesn't result in any errors, and
>> > messages still send and receive as normal.  I made the same changes to the 
>> > C
>> > test with the same result: **failed authentication has no consequence**.  I
>> > confirmed that `receive_and_process_zap_reply` is indeed returning `rc=-1`
>> > and setting `errno=EACCES`, but this does not seem to have any effect on 
>> > the
>> > behavior of the sockets.
>> >
>> > I assume this is not intended. Is the implementation supposed to be 
>> > complete
>> > at this point?  And what precisely should be the effect of a failed
>> > authentication (i.e. which calls should raise, block, etc.).
>> >
>> > Thanks,
>> > -MinRK
>> >
>> > _______________________________________________
>> > zeromq-dev mailing list
>> > zeromq-dev@lists.zeromq.org
>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> >
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>> 
>> _______________________________________________
>> zeromq-dev mailing list
>> zeromq-dev@lists.zeromq.org
>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev@lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to