Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
gmsec_kafka
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Christopher Reis
gmsec_kafka
Commits
125cfb8c
Commit
125cfb8c
authored
Jan 29, 2017
by
Christopher Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testing message addField
parent
40883ff0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
KafkaConnection.cpp
src/KafkaConnection.cpp
+7
-3
No files found.
src/KafkaConnection.cpp
View file @
125cfb8c
...
...
@@ -40,8 +40,8 @@
#include <gmsec_version.h>
#include "rdkafkacpp.h"
//
#include <librdkafka/rdkafkacpp.h>
//
#include "rdkafkacpp.h"
#include <librdkafka/rdkafkacpp.h>
using
namespace
gmsec
::
api
;
using
namespace
gmsec
::
api
::
internal
;
...
...
@@ -68,6 +68,7 @@ void msg_consume(RdKafka::Message* message, void* opaque) {
if
(
message
->
key
())
{
std
::
cout
<<
"Key: "
<<
*
message
->
key
()
<<
std
::
endl
;
}
printf
(
"%.*s
\n
"
,
static_cast
<
int
>
(
message
->
len
()),
static_cast
<
const
char
*>
(
message
->
payload
()));
...
...
@@ -284,6 +285,7 @@ void KafkaConnection::mwUnsubscribe(const char *subject)
void
KafkaConnection
::
mwPublish
(
const
Message
&
message
,
const
Config
&
config
)
{
Message
test_message
(
message
);
std
::
string
topic_str
;
topic_str
=
message
.
getSubject
();
...
...
@@ -317,7 +319,9 @@ void KafkaConnection::mwPublish(const Message& message, const Config& config)
exit
(
1
);
}
std
::
string
line
=
message
.
toXML
();
test_message
.
addField
(
"PRODUCER-NAME"
,
producer
->
name
().
c_str
());
test_message
.
addField
(
"PRODUCER-NAME-BIN"
,
(
GMSEC_BIN
)
producer
->
name
().
c_str
(),
7
);
std
::
string
line
=
test_message
.
toXML
();
/*
* Publish Message
*/
...
...
Write
Preview
Markdown
is supported
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