Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
65dd973f
Commit
65dd973f
authored
10 years ago
by
Jan Rinze Peterzon
Browse files
Options
Downloads
Patches
Plain Diff
Task #7342: adapted MessageBus.cc to match MessageBus.h
parent
74df2eab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LCS/MessageBus/include/MessageBus/MsgBus.h
+2
-1
2 additions, 1 deletion
LCS/MessageBus/include/MessageBus/MsgBus.h
LCS/MessageBus/src/MsgBus.cc
+8
-8
8 additions, 8 deletions
LCS/MessageBus/src/MsgBus.cc
with
10 additions
and
9 deletions
LCS/MessageBus/include/MessageBus/MsgBus.h
+
2
−
1
View file @
65dd973f
...
@@ -56,7 +56,7 @@ public:
...
@@ -56,7 +56,7 @@ public:
void
ack
(
qpid
::
messaging
::
Message
&
msg
);
void
ack
(
qpid
::
messaging
::
Message
&
msg
);
void
reject
(
qpid
::
messaging
::
Message
&
msg
);
void
reject
(
qpid
::
messaging
::
Message
&
msg
);
void
addQueue
(
const
std
::
string
&
address
=
"testqueue"
,
const
std
::
string
&
options
=
"; {create: always}"
);
bool
addQueue
(
const
std
::
string
&
address
=
"testqueue"
,
const
std
::
string
&
options
=
"; {create: always}"
);
};
};
class
ToBus
class
ToBus
...
@@ -72,5 +72,6 @@ public:
...
@@ -72,5 +72,6 @@ public:
void
send
(
const
std
::
string
&
msg
);
void
send
(
const
std
::
string
&
msg
);
};
};
#endif
#endif
}
#endif
#endif
This diff is collapsed.
Click to expand it.
LCS/MessageBus/src/MsgBus.cc
+
8
−
8
View file @
65dd973f
#include
"lofar_config.h"
#include
"lofar_config.h"
#include
<MessageBus/MsgBus.h>
#include
<MessageBus/MsgBus.h>
#include
<Common/LofarLogger.h>
//
#include <Common/LofarLogger.h>
#ifdef HAVE_QPID
#ifdef HAVE_QPID
#include
<qpid/types/Exception.h>
#include
<qpid/types/Exception.h>
#include
<qpid/messaging/exceptions.h>
#include
<qpid/messaging/exceptions.h>
#include
<qpid/messaging/Logger.h>
//
#include <qpid/messaging/Logger.h>
using
namespace
qpid
::
messaging
;
using
namespace
qpid
::
messaging
;
...
@@ -38,14 +38,14 @@ namespace LOFAR {
...
@@ -38,14 +38,14 @@ namespace LOFAR {
FromBus
::~
FromBus
(
void
)
FromBus
::~
FromBus
(
void
)
{
{
if
(
itsNrMissingACKs
)
//
if (itsNrMissingACKs)
LOG_ERROR_STR
(
"Queue "
<<
itsQueueName
<<
" on broker "
<<
itsBrokerName
<<
" has "
<<
itsNrMissingACKs
<<
" messages not ACK'ed "
);
//
LOG_ERROR_STR("Queue " << itsQueueName << " on broker " << itsBrokerName << " has " << itsNrMissingACKs << " messages not ACK'ed ");
}
}
bool
FromBus
::
getMessage
(
Message
&
msg
,
double
timeout
)
// timeout 0.0 means blocking
bool
FromBus
::
getMessage
(
Message
&
msg
,
double
timeout
)
// timeout 0.0 means blocking
{
{
Receiver
next
;
Receiver
next
;
if
(
s
ession
.
nextReceiver
(
next
,
TimeOutDuration
(
timeout
)))
if
(
itsS
ession
.
nextReceiver
(
next
,
TimeOutDuration
(
timeout
)))
{
{
itsNrMissingACKs
++
;
itsNrMissingACKs
++
;
return
next
.
get
(
msg
);
return
next
.
get
(
msg
);
...
@@ -91,7 +91,7 @@ namespace LOFAR {
...
@@ -91,7 +91,7 @@ namespace LOFAR {
itsConnection
.
open
();
itsConnection
.
open
();
itsSession
=
itsConnection
.
createSession
();
itsSession
=
itsConnection
.
createSession
();
Address
addr
(
address
+
options
);
Address
addr
(
address
+
options
);
s
ender
=
itsSession
.
createSender
(
addr
);
Sender
itsS
ender
=
itsSession
.
createSender
(
addr
);
}
catch
(
const
qpid
::
types
::
Exception
&
ex
)
{
}
catch
(
const
qpid
::
types
::
Exception
&
ex
)
{
THROW
(
MessageBusException
,
ex
.
what
());
THROW
(
MessageBusException
,
ex
.
what
());
}
}
...
@@ -102,9 +102,9 @@ namespace LOFAR {
...
@@ -102,9 +102,9 @@ namespace LOFAR {
void
ToBus
::
send
(
const
std
::
string
&
msg
)
void
ToBus
::
send
(
const
std
::
string
&
msg
)
{
{
Message
tosend
(
msg
);
Message
tosend
(
msg
);
s
ender
.
send
(
tosend
,
true
);
itsS
ender
.
send
(
tosend
,
true
);
}
}
}
// namespace LOFAR
}
// namespace LOFAR
#endif
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment