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
811a38a6
Commit
811a38a6
authored
Feb 13, 2017
by
Christopher Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Added error detection in Recieve"
This reverts commit
5f9040be
.
parent
5f9040be
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
KafkaConnection.cpp
src/KafkaConnection.cpp
+7
-12
No files found.
src/KafkaConnection.cpp
View file @
811a38a6
...
...
@@ -330,10 +330,10 @@ void KafkaConnection::mwPublish(const Message& message, const Config& config)
producer
->
poll
(
0
);
}
//
while (run && producer->outq_len() > 0) {
//
std::cerr << "Waiting for " << producer->outq_len() << std::endl;
//
producer->poll(250);
//
}
while
(
run
&&
producer
->
outq_len
()
>
0
)
{
std
::
cerr
<<
"Waiting for "
<<
producer
->
outq_len
()
<<
std
::
endl
;
producer
->
poll
(
250
);
}
GMSEC_DEBUG
<<
"gmsec_kafka:KafkaConnection::Publish(things)"
<<
'\n'
<<
message
.
toXML
()
;
}
...
...
@@ -351,7 +351,7 @@ void KafkaConnection::mwReply(const Message& request, const Message& reply)
void
KafkaConnection
::
mwReceive
(
Message
*&
message
,
GMSEC_I32
timeout
)
{
GMSEC_DEBUG
<<
"gmsec_kafka:KafkaConnection::mwReceive"
;
static
std
::
string
MSG_END
=
"</MESSAGE>"
;
message
=
NULL
;
RdKafka
::
Message
*
msg
=
consumer
->
consume
(
rkqu
,
(
int
)
timeout
);
...
...
@@ -360,14 +360,9 @@ void KafkaConnection::mwReceive(Message*& message, GMSEC_I32 timeout)
if
(
msg_str
.
find
(
"Broker:"
)
!=
string
::
npos
)
{
GMSEC_INFO
<<
msg_str
.
c_str
();
}
else
{
//Error Checking
std
::
size_t
found
=
msg_str
.
find
(
MSG_END
);
if
((
found
+
MSG_END
.
length
())
!=
msg_str
.
length
())
{
GMSEC_DEBUG
<<
"We have issues:"
<<
msg_str
.
substr
(
found
.
c_str
());
}
else
{
GMSEC_INFO
<<
'\n'
<<
msg_str
.
c_str
();
message
=
new
Message
(
msg_str
.
c_str
());
}
}
//msg_consume(msg, NULL);
delete
msg
;
...
...
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