Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
CAP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
tsai
CAP
Commits
04fbca02
Commit
04fbca02
authored
Jun 17, 2019
by
Savorboard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/dotnetcore/CAP
parents
4a799569
316a4d76
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
30 deletions
+16
-30
AzureServiceBusConsumerClient.cs
...Core.CAP.AzureServiceBus/AzureServiceBusConsumerClient.cs
+3
-3
CAP.KafkaOptions.cs
src/DotNetCore.CAP.Kafka/CAP.KafkaOptions.cs
+0
-1
CAP.RabbiMQOptions.cs
src/DotNetCore.CAP.RabbitMQ/CAP.RabbiMQOptions.cs
+9
-20
IConnectionChannelPool.Default.cs
...DotNetCore.CAP.RabbitMQ/IConnectionChannelPool.Default.cs
+4
-6
No files found.
src/DotNetCore.CAP.AzureServiceBus/AzureServiceBusConsumerClient.cs
View file @
04fbca02
...
...
@@ -154,9 +154,9 @@ namespace DotNetCore.CAP.AzureServiceBus
{
var
context
=
args
.
ExceptionReceivedContext
;
var
exceptionMessage
=
$"- Endpoint:
{
context
.
Endpoint
}
\r\n"
+
$"- Entity Path:
{
context
.
EntityPath
}
\r\n"
+
$"- Executing Action:
{
context
.
Action
}
\r\n"
+
$"- Endpoint:
{
context
.
Endpoint
}
"
+
Environment
.
NewLine
+
$"- Entity Path:
{
context
.
EntityPath
}
"
+
Environment
.
NewLine
+
$"- Executing Action:
{
context
.
Action
}
"
+
Environment
.
NewLine
+
$"- Exception:
{
args
.
Exception
}
"
;
var
logArgs
=
new
LogMessageEventArgs
...
...
src/DotNetCore.CAP.Kafka/CAP.KafkaOptions.cs
View file @
04fbca02
...
...
@@ -54,7 +54,6 @@ namespace DotNetCore.CAP
MainConfig
[
"bootstrap.servers"
]
=
Servers
;
MainConfig
[
"queue.buffering.max.ms"
]
=
"10"
;
MainConfig
[
"socket.blocking.max.ms"
]
=
"10"
;
MainConfig
[
"enable.auto.commit"
]
=
"false"
;
MainConfig
[
"log.connection.close"
]
=
"false"
;
MainConfig
[
"request.timeout.ms"
]
=
"3000"
;
...
...
src/DotNetCore.CAP.RabbitMQ/CAP.RabbiMQOptions.cs
View file @
04fbca02
...
...
@@ -2,15 +2,14 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
// ReSharper disable once CheckNamespace
using
System
;
using
RabbitMQ.Client
;
namespace
DotNetCore.CAP
{
public
class
RabbitMQOptions
{
/// <summary>
/// Default value for connection attempt timeout, in milliseconds.
/// </summary>
public
const
int
DefaultConnectionTimeout
=
30
*
1000
;
/// <summary>
/// Default password (value: "guest").
/// </summary>
...
...
@@ -63,21 +62,6 @@ namespace DotNetCore.CAP
/// </summary>
public
string
ExchangeName
{
get
;
set
;
}
=
DefaultExchangeName
;
/// <summary>
/// Timeout setting for connection attempts (in milliseconds).
/// </summary>
public
int
RequestedConnectionTimeout
{
get
;
set
;
}
=
DefaultConnectionTimeout
;
/// <summary>
/// Timeout setting for socket read operations (in milliseconds).
/// </summary>
public
int
SocketReadTimeout
{
get
;
set
;
}
=
DefaultConnectionTimeout
;
/// <summary>
/// Timeout setting for socket write operations (in milliseconds).
/// </summary>
public
int
SocketWriteTimeout
{
get
;
set
;
}
=
DefaultConnectionTimeout
;
/// <summary>
/// The port to connect on.
/// </summary>
...
...
@@ -87,5 +71,10 @@ namespace DotNetCore.CAP
/// Gets or sets queue message automatic deletion time (in milliseconds). Default 864000000 ms (10 days).
/// </summary>
public
int
QueueMessageExpires
{
get
;
set
;
}
=
864000000
;
/// <summary>
/// RabbitMQ native connection factory options
/// </summary>
public
Action
<
ConnectionFactory
>
ConnectionFactoryOptions
{
get
;
set
;
}
}
}
\ No newline at end of file
src/DotNetCore.CAP.RabbitMQ/IConnectionChannelPool.Default.cs
View file @
04fbca02
...
...
@@ -6,7 +6,6 @@ using System.Collections.Concurrent;
using
System.Diagnostics
;
using
System.Threading
;
using
Microsoft.Extensions.Logging
;
using
Newtonsoft.Json
;
using
RabbitMQ.Client
;
namespace
DotNetCore.CAP.RabbitMQ
...
...
@@ -43,7 +42,7 @@ namespace DotNetCore.CAP.RabbitMQ
Exchange
=
options
.
ExchangeName
+
"."
+
capOptions
.
Version
;
}
_logger
.
LogDebug
(
"RabbitMQ configuration of CAP :\r\n {0}"
,
JsonConvert
.
SerializeObject
(
options
,
Formatting
.
Indented
)
);
_logger
.
LogDebug
(
$"RabbitMQ configuration:'HostName:
{
options
.
HostName
}
, Port:
{
options
.
Port
}
, UserName:
{
options
.
UserName
}
, Password:
{
options
.
Password
}
, ExchangeName:
{
options
.
ExchangeName
}
'"
);
}
IModel
IConnectionChannelPool
.
Rent
()
...
...
@@ -96,19 +95,18 @@ namespace DotNetCore.CAP.RabbitMQ
UserName
=
options
.
UserName
,
Port
=
options
.
Port
,
Password
=
options
.
Password
,
VirtualHost
=
options
.
VirtualHost
,
RequestedConnectionTimeout
=
options
.
RequestedConnectionTimeout
,
SocketReadTimeout
=
options
.
SocketReadTimeout
,
SocketWriteTimeout
=
options
.
SocketWriteTimeout
VirtualHost
=
options
.
VirtualHost
};
if
(
options
.
HostName
.
Contains
(
","
))
{
options
.
ConnectionFactoryOptions
?.
Invoke
(
factory
);
return
()
=>
factory
.
CreateConnection
(
options
.
HostName
.
Split
(
new
[]
{
","
},
StringSplitOptions
.
RemoveEmptyEntries
));
}
factory
.
HostName
=
options
.
HostName
;
options
.
ConnectionFactoryOptions
?.
Invoke
(
factory
);
return
()
=>
factory
.
CreateConnection
();
}
...
...
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