You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2012/05/28 16:31:22 UTC
[jira] [Resolved] (CAMEL-5264) SNMP-Component doesn't response to
INFORM-Traps
[ https://issues.apache.org/jira/browse/CAMEL-5264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Willem Jiang resolved CAMEL-5264.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.10.0
Applied patch into trunk with thanks to Gergor.
> SNMP-Component doesn't response to INFORM-Traps
> -----------------------------------------------
>
> Key: CAMEL-5264
> URL: https://issues.apache.org/jira/browse/CAMEL-5264
> Project: Camel
> Issue Type: Improvement
> Components: camel-snmp
> Affects Versions: 2.9.2
> Reporter: Gregor Kopij
> Assignee: Willem Jiang
> Priority: Minor
> Fix For: 2.10.0
>
> Attachments: snmp-inform.patch
>
>
> When using INFORMs instead of TRAPs the component must response to the Message. Otherwise the sender tries to send the same INFROM x-times and it will be processed x-times in the SNMP-Component.
> The code below is taken from an example:
> {code:lang=java}
> if ((pdu.getType() != PDU.TRAP) &&
> (pdu.getType() != PDU.V1TRAP) &&
> (pdu.getType() != PDU.REPORT) &&
> (pdu.getType() != PDU.RESPONSE)) {
> pdu.setErrorIndex(0);
> pdu.setErrorStatus(0);
> pdu.setType(PDU.RESPONSE);
> StatusInformation statusInformation = new StatusInformation();
> StateReference ref = e.getStateReference();
> try {
> e.getMessageDispatcher().returnResponsePdu(e.
> getMessageProcessingModel(),
> e.getSecurityModel(),
> e.getSecurityName(),
> e.getSecurityLevel(),
> pdu,
> e.getMaxSizeResponsePDU(),
> ref,
> statusInformation);
> System.err.println("Response sent");
> }catch (MessageException ex) {
> System.err.println("Error while sending response: "+ex.getMessage());
> }
> }
> processPDU(pdu);
> {code}
> In this case the component sends a response to the sender before processing the message.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira