我是如何无意中使用ServiceStack和Redis创建拒绝服务的?
从我的服务中获得以下代码:我是如何无意中使用ServiceStack和Redis创建拒绝服务的?,redis,
servicestack,Redis,
servicestack,从我的服务中获得以下代码: namespace LO.Leads.Receiver.ServiceModel.Adapters.Prime { [Route("/leadpost")] public class PrimeLeadImportAdapter : IReturn<LeadInformationResponse> { public LeadInformation LeadInformation { get; set; } }
namespace LO.Leads.Receiver.ServiceModel.Adapters.Prime
{
[Route("/leadpost")]
public class PrimeLeadImportAdapter : IReturn<LeadInformationResponse>
{
public LeadInformation LeadInformation { get; set; }
}
public class LeadInformation
{
public LeadApplication LeadApplication { get; set; }
}
public class LeadApplication
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Email { get; set; }
}
public class LeadInformationResponse
{
public long TimeTakenMs { get; set; }
public ResponseStatus ResponseStatus { get; set; }
}
}
public class PrimeLeadServices : Service
{
public object Any(LeadInformation request)
{
var sw = Stopwatch.StartNew();
PublishMessage<LeadInformation>(request);
var response = new LeadInformationResponse
{
TimeTakenMs = sw.ElapsedMilliseconds,
};
return response;
}
}
public override void Configure(Container container)
{
container.Register<IRedisClientsManager>(new PooledRedisClientManager("localhost:6379"));
container.Register(c => c.Resolve<IRedisClientsManager>().GetCacheClient());
//Register MQ Broker Service
var mqService = new RedisMqServer(container.Resolve<IRedisClientsManager>());
container.Register<IMessageService>(mqService);
container.Register(mqService.MessageFactory);
mqService.RegisterHandler<LeadInformation>(ServiceController.ExecuteMessage);
mqService.Start();
}
当我发布到端点时,Redis通过MONITOR进入了一个可以说的尾旋,似乎被一遍又一遍地发出的相同命令轰炸
以下是一个示例:
1412368257.214613 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.214613 [0 127.0.0.1:50753] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.214613 [0 127.0.0.1:50753] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.214613 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"a93a8dad3661428cab58d8bf410e6060\",\"Creat
edDate\":\"\\/Date(1412368257214)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"c35ed994935d463b8640f5c6cfb0991d\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.214613 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.214613 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.214613 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.214613 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.214613 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"f5262b2d713946ba96c21f4dee6ccaa9\",\"CreatedDate\"
:\"\\/Date(1412368257214)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.214613 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.214613 [0 127.0.0.1:50753] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"a93a8dad3661428cab58d8bf410e6060\",\"Crea
tedDate\":\"\\/Date(1412368257214)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"c35ed994935d463b8640f5c6cfb0991d\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
1412368257.214613 [0 127.0.0.1:50753] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.214613 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"177e8c0ba22a49cebef99f523dadc969\",\"Creat
edDate\":\"\\/Date(1412368257214)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"2988c8b3803e4bd09a6259d8e89eeac9\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.214613 [0 127.0.0.1:50753] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.214613 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.214613 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.214613 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.214613 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.215613 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"9c2d8cd60f6043e999c910807c12f18e\",\"CreatedDate\"
:\"\\/Date(1412368257215)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.215613 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.215613 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"31693bdbc31c473ab1d4f96713038480\",\"Creat
edDate\":\"\\/Date(1412368257215)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"1e3896884da244618f35e6620ac177b7\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.215613 [0 127.0.0.1:50753] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"177e8c0ba22a49cebef99f523dadc969\",\"Crea
tedDate\":\"\\/Date(1412368257214)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"2988c8b3803e4bd09a6259d8e89eeac9\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
1412368257.215613 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.215613 [0 127.0.0.1:50753] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.215613 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.215613 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.215613 [0 127.0.0.1:50753] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.215613 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.215613 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.215613 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.215613 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"4d386184ef0c4d61934a7adfd46cf4eb\",\"CreatedDate\"
:\"\\/Date(1412368257215)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.215613 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.215613 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"ee3cd0823e2442fcb27844aedac063c1\",\"Creat
edDate\":\"\\/Date(1412368257215)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"f5262b2d713946ba96c21f4dee6ccaa9\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.216615 [0 127.0.0.1:50754] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"31693bdbc31c473ab1d4f96713038480\",\"Crea
tedDate\":\"\\/Date(1412368257215)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"1e3896884da244618f35e6620ac177b7\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
1412368257.216615 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.216615 [0 127.0.0.1:50754] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.216615 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.216615 [0 127.0.0.1:50754] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.216615 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.216615 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.216615 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.216615 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"6cd5b97f72d84cec945938b4e9f8bc5d\",\"CreatedDate\"
:\"\\/Date(1412368257216)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.216615 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.216615 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"2d110ee0da044069a8cf354c804c734b\",\"Creat
edDate\":\"\\/Date(1412368257216)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"9c2d8cd60f6043e999c910807c12f18e\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.216615 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.216615 [0 127.0.0.1:50753] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"ee3cd0823e2442fcb27844aedac063c1\",\"Crea
tedDate\":\"\\/Date(1412368257215)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"f5262b2d713946ba96c21f4dee6ccaa9\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
1412368257.216615 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.216615 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.216615 [0 127.0.0.1:50753] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.216615 [0 127.0.0.1:50753] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.216615 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.217615 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.217615 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"ab13d13e538445fe8a8ee67c795066ed\",\"CreatedDate\"
:\"\\/Date(1412368257216)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.217615 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.217615 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"7c4f3bff200f414c8ed664323033d7d5\",\"Creat
edDate\":\"\\/Date(1412368257217)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"4d386184ef0c4d61934a7adfd46cf4eb\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.217615 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.217615 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.217615 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.217615 [0 127.0.0.1:50754] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"2d110ee0da044069a8cf354c804c734b\",\"Crea
tedDate\":\"\\/Date(1412368257216)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"9c2d8cd60f6043e999c910807c12f18e\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
1412368257.217615 [0 127.0.0.1:50754] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.217615 [0 127.0.0.1:50754] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.217615 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"d2069fad518748559e625df43b41823d\",\"CreatedDate\"
:\"\\/Date(1412368257217)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.217615 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.217615 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.217615 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"27840eecacbf43aaa3a0d7609a623c0f\",\"Creat
edDate\":\"\\/Date(1412368257217)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"6cd5b97f72d84cec945938b4e9f8bc5d\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.217615 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.217615 [0 127.0.0.1:50753] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"7c4f3bff200f414c8ed664323033d7d5\",\"Crea
tedDate\":\"\\/Date(1412368257217)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"4d386184ef0c4d61934a7adfd46cf4eb\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
1412368257.218616 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.218616 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.218616 [0 127.0.0.1:50753] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.218616 [0 127.0.0.1:50753] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.218616 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.218616 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"2148d02eab7944858f5a2999046b5d2d\",\"CreatedDate\"
:\"\\/Date(1412368257218)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.218616 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.218616 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.218616 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"24d3690beaab4441b2f5958f86cbc510\",\"Creat
edDate\":\"\\/Date(1412368257218)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"ab13d13e538445fe8a8ee67c795066ed\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.218616 [0 127.0.0.1:50751] "PUBLISH" "mq:topic:in" "mq:LeadInformationResponse.inq"
1412368257.218616 [0 127.0.0.1:50754] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"27840eecacbf43aaa3a0d7609a623c0f\",\"Crea
tedDate\":\"\\/Date(1412368257217)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"6cd5b97f72d84cec945938b4e9f8bc5d\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
1412368257.218616 [0 127.0.0.1:50747] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.218616 [0 127.0.0.1:50749] "RPOP" "mq:LeadInformation.inq"
1412368257.218616 [0 127.0.0.1:50754] "LTRIM" "mq:LeadInformationResponse.outq" "0" "100"
1412368257.218616 [0 127.0.0.1:50754] "PUBLISH" "mq:topic:out" "mq:LeadInformationResponse.outq"
1412368257.218616 [0 127.0.0.1:50728] "RPOP" "mq:LeadInformationResponse.inq"
1412368257.218616 [0 127.0.0.1:50752] "LPUSH" "mq:LeadInformation.inq" "{\"Id\":\"4ec3dd7a500a4b18a8e16568b43d10b3\",\"CreatedDate\"
:\"\\/Date(1412368257218)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"Options\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceMode
l.Adapters.Prime.LeadInformation, LO.Leads.Receiver.ServiceModel\",\"LeadApplication\":{\"TrackingId\":0,\"InitialStatus\":0,\"TestL
ead\":false,\"ProductType\":0,\"FirstName\":\"Stephen\",\"LastName\":\"Patten\",\"ConsumerEnvironmentId\":0,\"Email\":\"stephen.patt
en@gmail.com\",\"MonthsEmployed\":0,\"IsRetired\":false,\"IsSelfEmployed\":false,\"MonthlyIncome\":0,\"MonthlyExpenses\":0,\"Rent\":
0,\"SupplementalIncome\":0,\"IsInDebtProgram\":false,\"BankABA\":false,\"BankAccountTermInMonths\":0,\"HasDirectDeposit\":false,\"Ha
sMovedRecently\":false,\"HasAgreedToEft\":false,\"IsHomeOwner\":false,\"AgreedToDialerTCPA\":false}}}"
1412368257.218616 [0 127.0.0.1:50752] "PUBLISH" "mq:topic:in" "mq:LeadInformation.inq"
1412368257.219617 [0 127.0.0.1:50751] "LPUSH" "mq:LeadInformationResponse.inq" "{\"Id\":\"e899c4d7488848eab9d3bc31d9045ad7\",\"Creat
edDate\":\"\\/Date(1412368257219)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"d2069fad518748559e625df43b41823d\",\"Options
\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\",
\"TimeTakenMs\":0}}"
1412368257.219617 [0 127.0.0.1:50753] "LPUSH" "mq:LeadInformationResponse.outq" "{\"Id\":\"24d3690beaab4441b2f5958f86cbc510\",\"Crea
tedDate\":\"\\/Date(1412368257218)\\/\",\"Priority\":0,\"RetryAttempts\":0,\"ReplyId\":\"ab13d13e538445fe8a8ee67c795066ed\",\"Option
s\":1,\"Body\":{\"__type\":\"LO.Leads.Receiver.ServiceModel.Adapters.Prime.LeadInformationResponse, LO.Leads.Receiver.ServiceModel\"
,\"TimeTakenMs\":0}}"
所以我的问题是我做错了什么?它似乎模仿了ServiceStack站点上发布的演示/测试代码。我已经运行了SS中包含的很多测试,没有一个显示出这个问题。难倒了
谢谢,,
Stephen这将无限期地向自身发布
LeadInformation
消息:
public class PrimeLeadServices : Service
{
public object Any(LeadInformation request)
{
var sw = Stopwatch.StartNew();
// This publishes a message that re-calls this service again
PublishMessage<LeadInformation>(request);
var response = new LeadInformationResponse
{
TimeTakenMs = sw.ElapsedMilliseconds,
};
return response;
}
}
公共类PrimeLeadServices:服务
{
任何公共对象(LeadInformation请求)
{
var sw=Stopwatch.StartNew();
//这将发布重新调用此服务的消息
发布消息(请求);
var响应=新的LeadInformationResponse
{
TimeTakenMs=sw.ElapsedMilliseconds,
};
返回响应;
}
}
废话!我从可重用性SMessageService开始,并询问为什么IMessageFactory属性在服务基类中存在,对吗?所以,这开始了我的重构之旅,但并没有结束得太好。祝你度过愉快的一天,mythz,谢谢你:)
public class PrimeLeadServices : Service
{
public object Any(LeadInformation request)
{
var sw = Stopwatch.StartNew();
// This publishes a message that re-calls this service again
PublishMessage<LeadInformation>(request);
var response = new LeadInformationResponse
{
TimeTakenMs = sw.ElapsedMilliseconds,
};
return response;
}
}