问题 当我重新启动/完成/停止流时,旧的消费者不会死/关闭:
[INFO ] a.a.RepointableActorRef -
Message [akka.kafka.KafkaConsumerActor$Internal$Stop$]
from Actor[akka://ufo-sightings/deadLetters]
to Actor[akka://ufo-sightings/system/kafka-consumer-1#1896610594]
was not delivered. [1] dead letters encountered.
Run Code Online (Sandbox Code Playgroud)
描述 我正在构建一个服务,它接收来自Kafka主题的消息,并通过HTTP请求将消息发送到外部服务.
可以断开与外部服务的连接,我的服务需要重试该请求.
此外,如果Stream中存在错误,则需要重新启动整个流.
最后,有时我不需要流和相应的Kafka消费者,我想关闭整个流
所以我有一个流:
Consumer.committableSource(customizedSettings, subscriptions)
.flatMapConcat(sourceFunction)
.toMat(Sink.ignore)
.run
Run Code Online (Sandbox Code Playgroud)
发送Http请求 sourceFunction
我在新文档中遵循了新的Kafka Consumer Restart说明
RestartSource.withBackoff(
minBackoff = 20.seconds,
maxBackoff = 5.minutes,
randomFactor = 0.2 ) { () =>
Consumer.committableSource(customizedSettings, subscriptions)
.watchTermination() {
case (consumerControl, streamComplete) =>
logger.info(s" Started Watching Kafka consumer id = ${consumer.id} termination: is shutdown: ${consumerControl.isShutdown}, is f completed: ${streamComplete.isCompleted}")
consumerControl.isShutdown.map(_ => logger.info(s"Shutdown of consumer finally happened …Run Code Online (Sandbox Code Playgroud) 我正在Android应用程序中实现DeepLinking.假设我使用PhonePe进行付款并选择使用其他应用程序付款并选择我的应用程序.
Intent intent = new Intent().
intent.setData("the data");
startactivityforresult(intent, 111);
Run Code Online (Sandbox Code Playgroud)
然后用户选择我的应用程序和我的启动画面,然后我转到这样的其他活动
Intent i = new Intent(Splashscreen.this, FirstActivity.class);
startactivity(i);
finish();
Run Code Online (Sandbox Code Playgroud)
然后到这样的其他活动 -
Intent i2 = new Intent(FirstActivity.this, SecondActivity.class);
startactivity(i2);
finish();
Run Code Online (Sandbox Code Playgroud)
在SecondActivity中经过一段时间后,我将结果发送回调用活动或这里的PhonePe -
Intent backintent = new Intent();
backintent.putExtra("somekey", "somevalue");
setResult(Result.OK, backintent);
Run Code Online (Sandbox Code Playgroud)
现在,当我的应用程序关闭并返回到Phoneme时,Phonepe收到的数据为空.
但是,如果我与其他只有一个活动的Application做同样的事情,那么调用活动捕获的数据不是null并且工作正常.
我想知道如何将数据发送回调用活动.我只能在同一个应用程序中发送数据.
开始活动时是否必须使用其他标签?
怎么了?
ps:我是来自.Net世界的node.js和我的新手!
我的server.js代码:
var events = require('events').EventEmitter;
var v = function() {
var e = new events();
e.emit('start');
};
var r = v();
r.on('start', function(){
console.log('event start just fired!!!!!!!!!!');
});
Run Code Online (Sandbox Code Playgroud)
并且这个控制台输出:
TypeError: Cannot read property 'on' of undefined
at Object.<anonymous> (E:\Project\node\BasicSocial\server.js:12:2)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Run Code Online (Sandbox Code Playgroud) 轻量级图表版本:3.1.3
我正在 Vue 项目中的加密货币交易应用程序中使用您的图表,但无论我收到什么错误,下面都是示例代码
没有重复或空数据。
import {createChart} from "lightweight-charts";
export default {
data() {
return {
chartProperties: {
width: 700,
height: 300,
timeScale: {
timeVisible: true,
secondsVisible: false
},
layout: {
//backgroundColor: '#262C49', //Dark Theme
//textColor: '#80859E',
fontSize: 12,
fontFamily: 'irsans ,Calibri'
}
},
chartData: [],
candleSeries: null,
}
}
mounted() {
let cdata = [
{
close: 22750.76
high: 22759.53
low: 22750.25
open: 22752.8
time: 1608635340
},
....
];
this.chartElement = document.getElementById('chart');
this.chartProperties.width = this.chartElement.offsetWidth;
this.chart = createChart(this.chartElement, …Run Code Online (Sandbox Code Playgroud) 我正在使用此linq查询进行登录
var login = context.Person_Login
.Where(c => c.Username == username && c.Password == password)
.DefaultIfEmpty(new Person_Login({Id = -1})
.First();
Run Code Online (Sandbox Code Playgroud)
但在执行中抛出此异常:
EntityFramework.SqlServer.dll中出现未处理的"System.NotSupportedException"类型异常
附加信息:无法创建"MyProject.MyModels.Person_Login"类型的常量值.在此上下文中仅支持基元类型或枚举类型.
javascript ×2
akka ×1
akka-stream ×1
android ×1
apache-kafka ×1
c# ×1
deep-linking ×1
dom-events ×1
events ×1
linq ×1
node.js ×1
scala ×1