I have the below header enricher in my configuration.
<int:header-enricher input-channel="" output-channel="" id="" >
<int:header name="OrderNo" expression="#gateway.exchange(#root).payload"/>
</int:header-enricher>
When the payload is null, I am getting the exception
java.lang.IllegalArgumentException: payload must not be null
at org.springframework.util.Assert.notNull(Assert.java:112)
at org.springframework.integration.support.MessageBuilder.<init>(MessageBuilder.java:56) ~[spring-integration-core-4.0.5.RELEASE.jar:na]
Is there a way to check for null payload from gateway and set some dummy value in header, if payload is null?
<int:gateway id="gateway" default-request-channel="defReqChannel" />
<int-jdbc:stored-proc-outbound-gateway request-channel="defReqChannel" data-source="dataSourceDD" expect-single-result="true" is-function="false" stored-procedure-name="SP_GET_CODE">
<int-jdbc:sql-parameter-definition name="param1" direction="IN" />
<int-jdbc:sql-parameter-definition name="param2" direction="IN" />
<int-jdbc:sql-parameter-definition name="param3" direction="INOUT" />
<int-jdbc:sql-parameter-definition name="param4" direction="IN" />
<int-jdbc:parameter name="param1" expression="exp1" />
<int-jdbc:parameter name="param2" expression="exp2" />
<int-jdbc:parameter name="param3" value="0"/>
<int-jdbc:parameter name="param4" value="0"/>
</int-jdbc:stored-proc-outbound-gateway>
The stored procedure that I am invoking can return a null value. (param3). The failure happens in those scenarios
Please, share more StackTrace. payload can't be null in the Message. The code you show is fully controlled by the Framework.
I think there is a code when you do something like MessageBuilder.withPayload(null).
But that fully isn't a case for config you demonstrate.
UPDATE
This is really a bug: https://jira.spring.io/browse/INT-4202.
The workaround is like do not use expect-single-result="true" and extract target value from the result Map downstream manually.
Related
<int:publish-subscribe-channel id="validateChannel" apply-sequence="true">
<int:interceptors>
<int:wire-tap channel="validateLogger" />
</int:interceptors>
</int:publish-subscribe-channel>
<int:logging-channel-adapter id="validateLogger" level="INFO" />
<int:bridge input-channel="validateChannel" output-channel="validateRequestOutputChannel" />
<int:bridge input-channel="validateChannel" output-channel="externalServiceChannel" />
<int:channel id="externalServiceChannel" />
I have PublishSubscribeChannel and two sequential subscribers to it. there are calls to 2 external apis.
Step 1 (call to first external api), this api will throw exception or send 200 OK, I want to call second external api(step 2) if this api throws 200 Ok or if throws exception, I want to catch it and throw custom exception to the end user.
<int:service-activator input-channel="validateRequestOutputChannel" ref="sampleTransformer" method="preprocessRequest" output-channel="testServiceRequestChannel"/>
<int-http:outbound-gateway id="testService"
url-expression="headers.testServiceURL"
http-method="POST" request-channel="testServiceRequestChannel" reply-channel="testResponseChannel"
charset="UTF-8"
extract-request-payload="true" expected-response-type="java.lang.String"
request-factory="customHttpRequestFactory"
mapped-request-headers="Content-Type:application/json"
reply-timeout="5000">
<int-http:request-handler-advice-chain>
<bean class="org.springframework.integration.handler.advice.ExpressionEvaluatingRequestHandlerAdvice">
<property name="onSuccessExpressionString" value="payload.delete()" />
<property name="successChannel" ref="afterSuccessFetchChannel" />
<property name="failureChannel" ref="afterFailFetchChannel" />
<property name="onFailureExpressionString" value="payload + ' was bad, with reason: ' + #exception.cause.message" />
</bean>
</int-http:request-handler-advice-chain>
</int-http:outbound-gateway>
<int:transformer input-channel="afterSuccessFetchChannel" output-channel="goodResultChannel1"
expression="'Fetching service : ' + payload + ' details was successful'" />
<int:transformer input-channel="afterFailFetchChannel" output-channel="badResultChannel1" ref="exceptionTransformer" method="handleErrorResponse"/>
<int:logging-channel-adapter id="badResultChannel1" level="ERROR"/>
<int:logging-channel-adapter id="goodResultChannel1" level="INFO" />
Step in between, for the step 2, I am using input channel as externalServiceChannel which is subscribe channel to pub sub channel but I am not able to figure out how to connect output channel of step 1 to input channel of step 2,
I was trying to use,
<int:exception-type-router input-channel="testResponseChannel" default-output-channel="errorRecoveryChannel">
<int:mapping exception-type="org.springframework.web.client.HttpClientErrorException.Conflict"
channel="lockServiceErrors"/>
</int:exception-type-router>
<int:chain input-channel="lockServiceErrors" output-channel="validateOutputChannel">
<int:header-enricher>
<int:header name="http_statusCode" value="409" />
</int:header-enricher>
<int:transformer expression="payload.failedMessage" />
</int:chain>
but the issue above is
first api sends 200 Ok, its sending its response payload in the message(which I don't want, I want to re use the one from pub sub channel)
I tried using ignoreFailures = true, then in case of exceptions, it suppresses exceptions from the first api and proceed to the second one, but I want to handle exceptions(it does not even call the method from exception transformer).
I tried <property name="onSuccessExpressionString" value="payload.delete()" /> but looks like it does not actually delete the payload.
Could you please help?
Step 2(call to second external api):
<int:chain id="test-chain" input-channel="externalServiceChannel" output-channel="validateOutputChannel">
<int:transformer ref="sampleTransformer" method="preprocessAPIInfo" />
<int-http:outbound-gateway id="testService2"
url-expression="headers.testService2URL"
http-method="GET"
extract-request-payload="false"
expected-response-type="com.bibo.test.UserInfo"
charset="UTF-8"
request-factory="customHttpRequestFactory"
mapped-request-headers="Content-Type:application/json,Accept:application/json"
reply-timeout="5000">
<int-http:uri-variable name="userId" expression="headers.userId" />
</int-http:outbound-gateway>
<int:transformer ref="sampleTransformer" method="processUserInfo" />
<int:object-to-json-transformer/>
</int:chain>
I suggest you to revise you flow without a publish-subscribe channel, but really make it linear: call second service after the first. And if first step fails, it is not going to the second which is really an output of the first.
To keep an original request access in the second step there is a trick: place this request into headers:
<int:header-enricher>
<int:header name="originalRequest" expression="payload"/>
</int:header-enricher>
Then when you need it in the second step you just do like this:
<int:transformer expression="headers.originalRequest"/>
The rest of error handling logic is probably OK.
I implemented a sftp-inbound-channel-adapter, and when an exception is handled , i should display a customized message.
I tried :
<int-sftp:inbound-channel-adapter id="sftpInbondAdapter"
auto-startup="true" channel="receiveChannel" session-factory="sftpSessionFactory"
local-directory="file:${directory.files.local}" remote-directory="${directory.files.remote}"
auto-create-local-directory="true" delete-remote-files="true"
filename-pattern="*.txt" >
<int:poller fixed-delay="${sftp.interval.request}"
max-messages-per-poll="-1" />
<int-sftp:request-handler-advice-chain>
<bean: class="org.springframework.integration.handler.advice.ExpressionEvaluatingRequestHandlerAdvice">
<property name="onSuccessExpression" value="payload" />
<property name="successChannel" ref="afterSuccessDeleteChannel" />
<property name="onFailureExpression" value="payload.renameTo(new java.io.File(payload.absolutePath + '.failed.to.send'))" />
<property name="failureChannel" ref="afterFailRenameChannel" />
</bean>
</int-sftp:request-handler-advice-chain>
But an element
<int-sftp:request-handler-advice-chain>
is not accepted. Can you explain another solution?
The request handler advice goes on some downstream component, not an inbound channel adapter.
You can add an error-channel to the <poller/> element. The message sent to the error channel will be an ErrorMessage with the exception as a payload. If it's an exception on the downstream flow, the payload will be a MessagingException with failedMessage and cause properties.
Add some component to consume the error messages.
I am using Spring Integration framework in my project. The database is db2 running on AS400. I have to call two stored procedures one after another. My first stored procedure is executed without any issues and passing the message to the second stored-proc-outbound-gateway. Here, weird thing is happening. It appears that the second stored procedure is executed successfully, but strangely the the second stored-proc-outbound-gateway is not producing any reply message.
The following are the log statements after I connect to SQL server:
[org.springframework.jdbc.core.JdbcTemplate.doInCallableStatement] CallableStatement.execute() returned 'true'
[org.springframework.jdbc.core.JdbcTemplate.doInCallableStatement] CallableStatement.getUpdateCount() returned -1
[org.springframework.jdbc.core.JdbcTemplate.extractReturnedResults] CallableStatement.getUpdateCount() returned 1
[org.springframework.jdbc.core.JdbcTemplate.extractReturnedResults] CallableStatement.getUpdateCount() returned -1
The same statements are different when I connect to db2:
DEBUG [org.springframework.jdbc.core.JdbcTemplate.doInCallableStatement] CallableStatement.execute() returned 'false'
DEBUG [org.springframework.jdbc.core.JdbcTemplate.doInCallableStatement] CallableStatement.getUpdateCount() returned 0
DEBUG [org.springframework.jdbc.core.JdbcTemplate.extractReturnedResults] CallableStatement.getUpdateCount() returned -1
Can any one please say what's wrong here?
Please feel free to ask me if you need any additional info.
Here is the complete spring-integration file for your reference:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:int-xml="http://www.springframework.org/schema/integration/xml"
xmlns:int="http://www.springframework.org/schema/integration"
xmlns:int-jdbc="http://www.springframework.org/schema/integration/jdbc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:int-http="http://www.springframework.org/schema/integration/http"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/xml
http://www.springframework.org/schema/integration/xml/spring-integration-xml.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/integration/jdbc
http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd
http://www.springframework.org/schema/integration/http
http://www.springframework.org/schema/integration/http/spring-integration-http.xsd ">
<int:channel id="PQPutUserBAInformation-InputChannel" />
<int:chain input-channel="PQPutUserBAInformation-InputChannel" output-channel="PQPutUserBAInformation-SetDateTag" >
<!-- Transformer to transform the resultXml to the user understandable form using XSLT -->
<int-xml:xslt-transformer xsl-resource="${stylesheet.PQPutUserBAInformationSetDateTag}" />
</int:chain>
<int:chain input-channel="PQPutUserBAInformation-SetDateTag" output-channel="PQPutUserBAInformation-SPCall" >
<!-- Split the Search Request Params from Xml -->
<int-xml:xpath-splitter>
<int-xml:xpath-expression expression="//AWDPQContactID" namespace-map="xmlMessageNamespace" />
</int-xml:xpath-splitter>
<!-- Store the original payload in header for future purpose -->
<int:header-enricher default-overwrite="true" should-skip-nulls="true" >
<int:header name="${headerNames.originalPayload}" expression="payload" />
</int:header-enricher>
</int:chain>
<!-- PQPutUserBAInformation Channel -->
<int:channel id="PQPutUserBAInformation-SPCall" />
<int:chain input-channel="PQPutUserBAInformation-SPCall" output-channel="PQPutUserBAInformation-SPCallStage1-Response" >
<int:service-activator ref="msgHandler" method="buildRequestBasedDataSource" />
<int-jdbc:stored-proc-outbound-gateway
id="PQPutUserBAInformation-AWD-StoredProcedure"
auto-startup="true"
data-source="routingDataSource"
stored-procedure-name="ZSPPQDELETEUSERIDBA"
skip-undeclared-results="true"
ignore-column-meta-data="true"
use-payload-as-parameter-source = "false"
expect-single-result="true" >
<int-jdbc:sql-parameter-definition name="P_USERID" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_BUSINESSAREA" direction="IN" type="VARCHAR" />
<int-jdbc:parameter name="P_USERID" expression="#xpath(payload, '//CurrentUserID')" />
<int-jdbc:parameter name="P_BUSINESSAREA" expression="#xpath(payload, '//SelectedBusinessArea/Code')" />
<int-jdbc:returning-resultset name="rowMapper" row-mapper="com.dsths.cs.awd.utils.ResultSetRowMapper"/>
</int-jdbc:stored-proc-outbound-gateway>
</int:chain>
<!-- Service Activator to build the Message from the Stored Procedure ResultSet -->
<int:channel id="PQPutUserBAInformation-SPCallStage1-Response" />
<int:service-activator input-channel="PQPutUserBAInformation-SPCallStage1-Response"
output-channel="PQPutUserBAInformation-SPCall2-Translate"
ref="msgHandler"
method="buildMessageFromExtSysResponse" />
<!-- Service Activator to build the Message from the Stored Procedure ResultSet -->
<int:channel id="PQPutUserBAInformation-SPCall2-Translate" />
<int:service-activator input-channel="PQPutUserBAInformation-SPCall2-Translate"
output-channel="PQPutUserBAInformation-SPCall2"
ref="cacheRequestHandler"
method="translatePassword" />
<!-- PQPutUserBAInformation Channel -->
<int:channel id="PQPutUserBAInformation-SPCall2" />
<int:chain input-channel="PQPutUserBAInformation-SPCall2" output-channel="PQPutUserBAInformation-SPCallStage2-Response" >
<int:service-activator ref="msgHandler" method="buildRequestBasedDataSource" />
<int-jdbc:stored-proc-outbound-gateway
id="PQPutUserBAInformation-AWD-StoredProcedure2"
auto-startup="true"
data-source="routingDataSource"
stored-procedure-name="ZSPPQINSERTUSERIDBA"
skip-undeclared-results="true"
ignore-column-meta-data="true"
use-payload-as-parameter-source = "false"
expect-single-result="true" >
<int-jdbc:sql-parameter-definition name="P_USERID" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_BUSINESSAREA" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_SELECTEDIND" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_DEFAULTIND" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_LEGACYSYSTEM" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_LEGACYLOGIN" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_LEGACYPASSWORD" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_OTHERLOGIN" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_OTHERPASSWORD" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_ADDSECURLOGIN" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_ADDSECURPASSWORD" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_LASTUPDATEUSERID" direction="IN" type="VARCHAR" />
<int-jdbc:sql-parameter-definition name="P_LASTUPDATE" direction="IN" type="VARCHAR" />
<int-jdbc:parameter name="P_USERID" expression="#xpath(payload, '//CurrentUserID')" />
<int-jdbc:parameter name="P_BUSINESSAREA" expression="#xpath(payload, '//SelectedBusinessArea/Code')" />
<int-jdbc:parameter name="P_SELECTEDIND" expression="#xpath(payload, '//SelectedBusinessArea/Selected')" />
<int-jdbc:parameter name="P_DEFAULTIND" expression="#xpath(payload, '//SelectedBusinessArea/Default')" />
<int-jdbc:parameter name="P_LEGACYSYSTEM" expression="#xpath(payload, '//SelectedBusinessArea/LegacySystem')" />
<int-jdbc:parameter name="P_LEGACYLOGIN" expression="#xpath(payload, '//SelectedBusinessArea/LegacyLogin')" />
<int-jdbc:parameter name="P_LEGACYPASSWORD" expression="headers.LegacyPassword" />
<int-jdbc:parameter name="P_OTHERLOGIN" expression="#xpath(payload, '//SelectedBusinessArea/OtherLogin')" />
<int-jdbc:parameter name="P_OTHERPASSWORD" expression="headers.otherPassword" />
<int-jdbc:parameter name="P_ADDSECURLOGIN" expression="#xpath(payload, '//SelectedBusinessArea/AddSecurLogin')" />
<int-jdbc:parameter name="P_ADDSECURPASSWORD" expression="headers.addSecurPassword" />
<int-jdbc:parameter name="P_LASTUPDATEUSERID" expression="#xpath(payload, '//userID')" />
<int-jdbc:parameter name="P_LASTUPDATE" expression="#xpath(payload, '//dateTimeStamp')" />
<int-jdbc:returning-resultset name="rowMapper" row-mapper="com.dsths.cs.awd.utils.ResultSetRowMapper"/>
</int-jdbc:stored-proc-outbound-gateway>
</int:chain>
<!-- Service Activator to build the Message from the Stored Procedure ResultSet -->
<int:channel id="PQPutUserBAInformation-SPCallStage2-Response" />
<int:service-activator input-channel="PQPutUserBAInformation-SPCallStage2-Response"
output-channel="PQPutUserBAInformation-Enrich-SPCallStage2"
ref="msgHandler"
method="buildMessageFromExtSysResponse" />
<!-- Service Activator to build the jobResponse xml making use of jobRequestXml and xlst transformed xml-->
<int:channel id="PQPutUserBAInformation-Enrich-SPCallStage2" />
<int:service-activator input-channel="PQPutUserBAInformation-Enrich-SPCallStage2"
output-channel="PQPutUserBAInformation-CleanUp"
ref="msgHandler"
method="enrichPayloadXml" />
<int:chain input-channel="PQPutUserBAInformation-CleanUp" >
<!-- Transformer to transform the resultXml to the user understandable form using XSLT -->
<int-xml:xslt-transformer xsl-resource="${stylesheet.PQPutUserBAInformationCleanUp}" />
</int:chain>
</beans>
I got the same problem, and I fixed it, the exception means the transform step returns null(shouldn't be null) because the message I created cant be properly transformed. Try to debug into the transform step, and see what is the outcome. the exception happened in my second line:
IntegrationFlows.from(testChannel() )
.transform( new ObjectTransformer() )
.<Object, Class<?>>route(Object::getClass,
It means the stored proc produced no result.
In the below example Spring Integration message flow, I need to be able to reprocess the original message. One of the areas I have exceptions is in the transformer or in the call to the web service at the end. So what I have seen so far is that once the payload is changed via a transformer or service, I can't roll back to the original message that was placed on the jms queue. Is there a feature that would allow for me to send the original message to a different jms queue when exceptions occur?
<int-jms:message-driven-channel-adapter
id="Jms"
connection-factory="connectionFactory"
destination="queue"
channel="XMLChannel"
error-channel="errorChannel"
/>
<int:channel id="XMLChannel"/>
<int:chain input-channel="XMLChannel" output-channel="ObjectChannel">
<int-xml:unmarshalling-transformer id="defaultUnmarshaller" unmarshaller="xmlMarshaller" />
</int:chain>
<int:channel id="ObjectChannel"/>
<int:chain id="transformerChain" input-channel="ObjectChannel" output-channel="post" >
<int:filter ref="environmentFilter" />
<int:filter ref="emailFilter" />
<int:transformer ref="transformer" />
<int:object-to-json-transformer object-mapper="objectMapperFactory" />
<int:header-enricher>
<int:header name="content-type" value="application/json"></int:header>
</int:header-enricher>
<int-http:outbound-gateway
url="${url.${runtime.environment}}"
http-method="POST"
expected-response-type="java.lang.String"
charset="UTF-8"
reply-channel="post">
<int-http:request-handler-advice-chain>
<int:retry-advice max-attempts="3">
<int:exponential-back-off initial="5000" multiplier="10.0" maximum="600000" />
</int:retry-advice>
</int-http:request-handler-advice-chain>
</int-http:outbound-gateway>
</int:chain>
<int:channel id="post"/>
<int:logging-channel-adapter channel="post" level="INFO" log-full-message="true"/>
<int:exception-type-router input-channel="addChannel" default-output-channel="errorChannel">
<int:mapping />
</int:exception-type-router>
<int:channel id="errorChannel" />
<int:chain input-channel="errorChannel">
<int:transformer ref="errorTransformer"/>
<!-- <int:object-to-json-transformer/>
<int-xml:marshalling-transformer marshaller="xmlMarshaller" /> -->
<int-jms:outbound-channel-adapter id="dcsConsumerAppointmentError"
connection-factory="connectionFactory" destination="dcsConsumerAppointmentErrorQueue" />
</int:chain>
#Transformer
public Message<?> handleFailedOrder(Message<MessageHandlingException> message) throws JAXBException, IOException {
log.info(message.getPayload().getMessage());
JAXBElement<CustomerRequestVO> test = (JAXBElement<CustomerRequestVO>) message.getPayload().getFailedMessage().getPayload();
String xml = jaxbMarshalToString(test.getValue());
Message<?> messageOut = MessageBuilder.withPayload(xml).setHeader("Exception", message.getPayload().getMessage()).build();
return messageOut;
}
It isn't clear from your config what is addChannel, but as far as you use error-channel="errorChannel" the original message (I guess it is an XML) will be sended to the errorChannel as failedMessage of the MessagingException.
If your handleFailedOrder is a <int:transformer ref="errorTransformer"/> for the errorChannel, your message.getPayload().getFailedMessage().getPayload() should be an original XML, not unmarshaled CustomerRequestVO.
Another trick to keep track of the original payload is to put it to the MessageHeaders before further processing and transformation.
However, of course, you should keep in mind that the copy of the same mutable object will be changed everywhere, you will change its property once.
I am new to mobicents diameter and followed the example downloaded here.
Executing both ExampleClient and ExampleServer on the same machine with different ports the "Result-code" is 3002
"Error-message" is "No connection to peer"
Where am I wrong?
Protocol error:
DIAMETER_UNABLE_TO_DELIVER 3002
This error is given when Diameter can not deliver the message to
the destination, either because no host within the realm
supporting the required application was available to process the
request, or because Destination-Host AVP was given without the
associated Destination-Realm AVP.
client-jdiameter-config.xml
<?xml version="1.0"?>
<Configuration xmlns="http://www.jdiameter.org/jdiameter-server">
<LocalPeer>
<URI value="aaa://127.0.0.1:1812" />
<IPAddresses>
<IPAddress value="127.0.0.1" />
</IPAddresses>
<Realm value="mobicents.org" />
<VendorID value="0" />
<ProductName value="jDiameter" />
<FirmwareRevision value="1" />
<OverloadMonitor>
<Entry index="1" lowThreshold="0.5" highThreshold="0.6">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Entry>
</OverloadMonitor>
</LocalPeer>
<Parameters>
<AcceptUndefinedPeer value="false" />
<DuplicateProtection value="true" />
<DuplicateTimer value="240000" />
<UseUriAsFqdn value="false" />
<QueueSize value="10000" />
<MessageTimeOut value="60000" />
<StopTimeOut value="10000" />
<CeaTimeOut value="10000" />
<IacTimeOut value="30000" />
<DwaTimeOut value="10000" />
<DpaTimeOut value="5000" />
<RecTimeOut value="10000" />
<Concurrent>
<Entity name="ThreadGroup" size="64" />
<Entity name="ProcessingMessageTimer" size="1" />
<Entity name="DuplicationMessageTimer" size="1" />
<Entity name="RedirectMessageTimer" size="1" />
<Entity name="PeerOverloadTimer" size="1" />
<Entity name="ConnectionTimer" size="1" />
<Entity name="StatisticTimer" size="1" />
</Concurrent>
</Parameters>
<Network>
<Peers>
<Peer name="aaa://127.0.0.1:3868" attempt_connect="true" rating="1" />
</Peers>
<Realms>
<Realm name="mobicents.org" peers="127.0.0.1"
local_action="LOCAL" dynamic="false" exp_time="1">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Realm>
</Realms>
</Network>
<Extensions />
</Configuration>
server-jdiameter-config.xml
<?xml version="1.0"?>
<Configuration xmlns="http://www.jdiameter.org/jdiameter-server">
<LocalPeer>
<URI value="aaa://127.0.0.1:3868" />
<IPAddresses>
<IPAddress value="127.0.0.1" />
</IPAddresses>
<Realm value="mobicents.org" />
<VendorID value="0" />
<ProductName value="jDiameter" />
<FirmwareRevision value="1" />
<OverloadMonitor>
<Entry index="1" lowThreshold="0.5" highThreshold="0.6">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Entry>
</OverloadMonitor>
</LocalPeer>
<Parameters>
<!-- set to true, we can safely remove client def in this case -->
<AcceptUndefinedPeer value="true" />
<DuplicateProtection value="true" />
<DuplicateTimer value="240000" />
<UseUriAsFqdn value="false" />
<QueueSize value="10000" />
<MessageTimeOut value="60000" />
<StopTimeOut value="10000" />
<CeaTimeOut value="10000" />
<IacTimeOut value="30000" />
<DwaTimeOut value="10000" />
<DpaTimeOut value="5000" />
<RecTimeOut value="10000" />
<Concurrent>
<Entity name="ThreadGroup" size="64" />
<Entity name="ProcessingMessageTimer" size="1" />
<Entity name="DuplicationMessageTimer" size="1" />
<Entity name="RedirectMessageTimer" size="1" />
<Entity name="PeerOverloadTimer" size="1" />
<Entity name="ConnectionTimer" size="1" />
<Entity name="StatisticTimer" size="1" />
</Concurrent>
</Parameters>
<Network>
<Peers>
<!-- our client, lets define it -->
<Peer name="aaa://127.0.0.1:1812" attempt_connect="false"
rating="1" />
</Peers>
<Realms>
<Realm name="mobicents.org" peers="127.0.0.1" local_action="LOCAL" dynamic="false" exp_time="1">
<ApplicationID>
<VendorId value="0" />
<AuthApplId value="333333" />
<AcctApplId value="0" />
</ApplicationID>
</Realm>
</Realms>
</Network>
<Extensions />
</Configuration>