Skip to content

Commit 11ad4a4

Browse files
committed
Added exchange optional parameter.
Restores commit e9c6112
1 parent 34316ee commit 11ad4a4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

isc/rabbitmq/Common.cls

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@ Property Port As %Integer [ InitialExpression = -1 ];
99

1010
Property VirtualHost As %String [ InitialExpression = "/" ];
1111

12+
/// Outbound adapter only (ignored for inbound adapter)
13+
/// If Exchange is not set, then Queue name.
14+
/// If Exchange is set, then Routing Key.
1215
Property Queue As %String;
1316

17+
/// Exchange name.
18+
/// Optional, empty by default.
19+
/// If set, Queue becomes Routing Key.
20+
Property Exchange As %String;
21+
1422
/// Config Name of the Java Gateway service controlling the Java Gateway server this item will use.
1523
/// Alternatively use JGHost and JGPort Settings, to specify Java gateway outside of Ensemble scope.
1624
Property JGService As %String;
@@ -40,7 +48,7 @@ Property Encoding As %String;
4048
Property ClassPath As %String(MAXLEN = 32000);
4149

4250
/// These are the production settings for this object
43-
Parameter SETTINGS = "Host:Basic,Port:Basic,VirtualHost:Basic,Queue:Basic,Credentials:Basic:credentialsSelector,JGHost:Java Gateway,JGPort:Java Gateway,JGService:Java Gateway:selector?context={Ens.ContextSearch/ProductionItems?targets=0&productionName=@productionId},ClassPath:Basic,Encoding:Basic";
51+
Parameter SETTINGS = "Host:Basic,Port:Basic,VirtualHost:Basic,Queue:Basic,Exchange:Basic,Credentials:Basic:credentialsSelector,JGHost:Java Gateway,JGPort:Java Gateway,JGService:Java Gateway:selector?context={Ens.ContextSearch/ProductionItems?targets=0&productionName=@productionId},ClassPath:Basic,Encoding:Basic";
4452

4553
/// Connect to running JGW
4654
Method Connect() As %Status
@@ -82,7 +90,7 @@ Method ConnectToRabbitMQ() As %Status
8290
}
8391

8492
Try {
85-
Set ..API = ##class(isc.rabbitmq.API).%New(..JGW, ..Host, ..Port, user, pass, ..VirtualHost, ..Queue, $$$YES)
93+
Set ..API = ##class(isc.rabbitmq.API).%New(..JGW, ..Host, ..Port, user, pass, ..VirtualHost, ..Queue, $$$YES, ..Exchange)
8694
} Catch ex {
8795
Set sc = ..ExceptionToStatus(ex)
8896
}

0 commit comments

Comments
 (0)