Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Open Subsurface Data Universe Software
Platform
System
Lib
cloud
ibm
OS Core Lib IBM
Commits
08ada002
Commit
08ada002
authored
Oct 08, 2021
by
Shrikant Garg
Browse files
Merge branch 'configurable_topic_name' into 'master'
topic name made configurable See merge request
!32
parents
98bf09bf
fe10e9b0
Pipeline
#70779
failed with stages
in 8 minutes and 55 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/main/java/org/opengroup/osdu/core/ibm/messagebus/StatusEventPublisher.java
View file @
08ada002
...
...
@@ -18,6 +18,7 @@ import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import
org.opengroup.osdu.core.common.model.status.Message
;
import
org.opengroup.osdu.core.common.status.IEventPublisher
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.jms.JmsException
;
import
org.springframework.jms.core.JmsTemplate
;
import
org.springframework.stereotype.Component
;
...
...
@@ -27,8 +28,11 @@ import com.google.gson.Gson;
@Component
public
class
StatusEventPublisher
implements
IEventPublisher
{
@Value
(
"${status.update.event.topic:status-event-default-topic}"
)
private
String
STATUS_UPDATE_EVENT_TOPIC
;
private
static
final
String
FAILED_TO_PUBLISH_STATUS
=
"Failed to publish status. "
;
private
final
static
String
RECORDS_CHANGED_TOPIC
=
"records-changed-topic"
;
String
correlationId
=
null
;
String
dataPartitionId
=
null
;
private
Set
<
String
>
existingTopics
=
new
HashSet
<
String
>();
...
...
@@ -46,7 +50,7 @@ public class StatusEventPublisher implements IEventPublisher {
log
.
info
(
DpsHeaders
.
CORRELATION_ID
+
" "
+
correlationId
+
DpsHeaders
.
DATA_PARTITION_ID
+
" "
+
dataPartitionId
+
" status msgs: "
+
messages
);
String
topicNameWithPrefix
=
dataPartitionId
+
"-"
+
RECORDS_CHANGED
_TOPIC
;
String
topicNameWithPrefix
=
dataPartitionId
+
"-"
+
STATUS_UPDATE_EVENT
_TOPIC
;
String
msg
=
""
;
if
(
existingTopics
.
contains
(
topicNameWithPrefix
))
{
for
(
Message
message:
messages
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment