summaryrefslogtreecommitdiff
path: root/dotnet/Qpid.Client/Client/AMQConnection.cs
diff options
context:
space:
mode:
authorSteven Shaw <steshaw@apache.org>2006-11-28 19:12:37 +0000
committerSteven Shaw <steshaw@apache.org>2006-11-28 19:12:37 +0000
commit16f6727812c3c86b8be3e6c306408e9c6cc90633 (patch)
tree8e9edb6637ff6af93980d6962172a646242c3c74 /dotnet/Qpid.Client/Client/AMQConnection.cs
parentf1503a0dd2aa10a83a18550dcde4843dd8aef0cb (diff)
downloadqpid-python-16f6727812c3c86b8be3e6c306408e9c6cc90633.tar.gz
Initial changes to record and replay frames on fail over.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dotnet/Qpid.Client/Client/AMQConnection.cs')
-rw-r--r--dotnet/Qpid.Client/Client/AMQConnection.cs19
1 files changed, 10 insertions, 9 deletions
diff --git a/dotnet/Qpid.Client/Client/AMQConnection.cs b/dotnet/Qpid.Client/Client/AMQConnection.cs
index 021d34f1bb..ed85ec483b 100644
--- a/dotnet/Qpid.Client/Client/AMQConnection.cs
+++ b/dotnet/Qpid.Client/Client/AMQConnection.cs
@@ -738,23 +738,25 @@ namespace Qpid.Client
}
/**
- * For all sessions, and for all consumers in those sessions, resubscribe. This is called during failover handling.
+ * For all channels, and for all consumers in those sessions, resubscribe. This is called during failover handling.
* The caller must hold the failover mutex before calling this method.
*/
- public void ResubscribeSessions()
+ public void ResubscribeChannels()
{
- ArrayList sessions = new ArrayList(_sessions.Values);
- _log.Info(String.Format("Resubscribing sessions = {0} sessions.size={1}", sessions, sessions.Count));
- foreach (AmqChannel s in sessions)
+ ArrayList channels = new ArrayList(_sessions.Values);
+ _log.Info(String.Format("Resubscribing sessions = {0} sessions.size={1}", channels, channels.Count));
+ foreach (AmqChannel channel in channels)
{
- _protocolSession.AddSessionByChannel(s.ChannelId, s);
- ReopenChannel(s.ChannelId, (ushort)s.DefaultPrefetch, s.Transacted);
- s.Resubscribe();
+ _protocolSession.AddSessionByChannel(channel.ChannelId, channel);
+ ReopenChannel(channel.ChannelId, (ushort)channel.DefaultPrefetch, channel.Transacted);
+ channel.ReplayOnFailOver();
}
}
private void ReopenChannel(ushort channelId, ushort prefetch, bool transacted)
{
+ _log.Info(string.Format("Reopening channel id={0} prefetch={1} transacted={2}",
+ channelId, prefetch, transacted));
try
{
createChannelOverWire(channelId, prefetch, transacted);
@@ -781,7 +783,6 @@ namespace Qpid.Client
typeof (BasicQosOkBody));
}
-
if (transacted)
{
if (_log.IsDebugEnabled)