Delayed Messaging

大厂消息中间件高频面试题与知识点整理(RabbitMQ、RocketMQ、ActiveMQ、Kafka、ZeroMQ、MetaMQ):35道高频题的答案、原理、Kafka 4.4实测与版本差异解析整理 本文整理35道消息中间件高频面试题:23道经典题保留题目并逐题核对答案,另补12道常问的新题。内容覆盖六款MQ对比与线程安全、消息不丢的三段六处、顺序与幂等、RabbitMQ仲裁队列、Kafka副本与ISR、acks与min.insync.replicas、段文件与稀疏索引、零拷贝、积压处置、再均衡、事务、KRaft与共享组,以及RocketMQ存储、事务消息、延迟消息与死信。关键结论在本机5节点Kafka 4.4.0集群上实测,含unclean选举丢失1000条已确认消息,并注明版本差异。 阅读详情

Delayed Messaging

by Mike Morton

Benefits of Procrastination: Delayed Messaging using the Foundation Kit

Introduction

When you send an Objective-C message to an object, you expect that object to receive the message and process it immediately. Right? Maybe not...

The Foundation Kit provides a way to post messages and have them delivered later, through the method performSelector:withObject:afterDelay:. This method is part of the NSObject class, from which most other classes descend. In this article, we'll discuss not only how you use this method, but give some examples of how delayed messaging solves some difficult problems.

If you've just begun working with Foundation Kit and AppKit, don't worry - we'll explain things step-by-step. In each of the four examples below, we'll describe the problem, show the solution working in the application, and then review the relevant parts of the code. But first, let's look at the method itself.

How to Send a Delayed Message

The method which lets you send delayed messages to any NSObject is declared like this:

- (void) performSelector
:(SEL) aSelector
withObject :(id) anArgument
afterDelay :(NSTimeInterval) delay;

This method takes three arguments:

aSelector specifies the message to send. A selector is sort of the "name" of a method, a very distant cousin of C's function pointers. (In some implementations, a selector is just a "char *" pointer to a unique string value, and this can be useful in debugging, but you should never depend on it being so.) Unlike function pointers, selectors have their own data type, SEL, and you can refer to them in Objective-C code using the @selector(...) construct. For example, if you'd like to send the message setFoo:, you can specify the selector for that message with @selector(setFoo:).

anArgument is an optional object to send with the message. If you don't want to pass anything, you can pass nil. But keep in mind that if you do want to pass something, it must be an object - not an integer or other C type. (In theory, the method specified by aSelector should take a single argument, but no-argument methods seem to work fine. Of course, two-argument methods don't work, because there's no way to pass a second argument with this API.) delay is the number of seconds to delay before sending the message. [If you used the method like this one in earlier releases of Foundation, note that the delay is no longer expressed in milliseconds.] If the program is busy, the message may take longer before being delivered, but it will never get delivered early.

Using this method, you can send any one-argument message with a delay. For example, if you have an object printer which implements the method printString:, you can have it receive a printString: message after a delay of ten seconds with this code:

[printer performSelector :@selector(printString:)
withObject :@"Hello, world!"
afterDelay :10.0];

This is almost the same as messaging the object directly with [printer printString :@"Hello, world!"], except that the message gets delivered later, not "while you wait". Also, of course, if printString: returns a value, you can't get that value when using delayed messaging, because you want to continue before the message even gets received. (Modern CPUs are fast, but still don't support time-travel.)

If you change your mind about a delayed message you sent earlier, you can cancel it, using an NSObject class method:

+ (void) cancelPreviousPerformRequestsWithTarget
:(id) aTarget
selector :(SEL) aSelector
object :(id) anArgument;

That's the "how" of delayed messaging. But why would you want to use it. Each of the four examples shows one reason why - let's take a look in more detail. The source code for each of these demos is available online at ftp://ftp.mactech.com .

Example #1: Are They Going to Click Again?

Suppose you're implementing a web browser (just to give Netscape and Microsoft some competition). If the user clicks on a link, the browser displays the new page in the same window. But if they double-click the link, you want to open a new window.

What should your program do on that first click? You can't display the new page (because if a second click shows up, that means the user didn't want to change this window's display). But you also can't ignore the first click (because if no second click arrives, you want to display the new page).

Try it: The demo doesn't browse the web, but it does show an example of not acting on every click. Quickly click on the red rectangle one or more times; it changes color with every click. Now check "Wait for clicks to stop before redisplaying", and it will change color only after you finish clicking.

Figure 1. Acting on multiple clicks

This part of the demo uses a custom view named ColorView, a subclass of the AppKit's important NSView class. The two instance variables for the class remember (1) what color it currently draws, and (2) how quickly it redraws. The class interface, from ColorView.h, begins like this:

Listing 1: Start of ColorView class interface
@interface ColorView : NSView
{
NSColor *color; // color we fill with
BOOL delaysDisplay; // YES => wait to redraw
}

The header file also lists access methods, methods which get and set the instance variables, but these aren't shown in Listing 1.

The implementation, in ColorView.m, overrides some methods from NSView - initWithFrame:, which all views use to initialize; drawRect:, which displays the view's contents; and mouseDown:, which handles mouse clicks. The latter two are more important.

The drawRect: method (Listing 2) is simple. It sends a set message to the view's current color, so that subsequent PostScript drawing will use that color, and calls a PostScript function to fill in the rectangle.

Listing 2: ColorView's drawRect: method
- (void)drawRect                // redraw contents of...
:(NSRect) aRect; // INPUT: ...this rect
{
[[self color] set]; // paint with this color
PSrectfill (aRect.origin.x, aRect.origin.y,
aRect.size.width, aRect.size.height);
}

The mouseDown: method (Listing 3) is also short, but does a lot more. It updates the view's color, based on the event's click count - the NSEvent method clickCount returns 1 for a click, 2 for a double-click, etc.

Listing 3: ColorView's mouseDown: method
- (void) mouseDown
:(NSEvent *) theEvent;
{
// Update our color: red for a single-click,
// orange for a double-click, etc.
[self _setColorAtIndex :[theEvent clickCount]-1];
}

When mouseDown: sends _setColorAtIndex:, that method winds up calling setColor:, which is where things start to get interesting. When you give the ColorView a new color, it will redraw itself, but it may not do so immediately. After it remembers the new color, it checks "if ([self delaysDisplay])". If it doesn't delay displaying, it sends "[self setNeedsDisplay :YES]" - that's how you ask any NSView to redraw.

But if you click the checkbox "Wait for clicks to stop before redisplaying", the checkbox sends takeDelaysDisplayFrom: to the ColorView, which will take a new value of delaysDisplay from the checkbox.

And when [self delaysDisplay] returns YES, the ColorView knows that it shouldn't redraw, but it also that it shouldn't forget about the color change, since it needs to redraw at some point. So it does the code in Listing 4: first, it removes any pending redraw requests, then it sends a _setNeedsDisplayYes message, but delaying the delivery. (Why doesn't it send a delayed setNeedsDisplay:, with an argument of YES? Because the argument of a delayed message must be an object.)

Listing 4: ColorView's delaying of redraw
{
// Cancel any pending message...
[NSObject cancelPreviousPerformRequestsWithTarget
:self
selector :@selector(_setNeedsDisplayYes)
object :nil];

// ...and queue a new one
[self performSelector
:@selector(_setNeedsDisplayYes)
withObject :nil
afterDelay :REDRAW_DELAY];
}

How on earth does this work? Every time you click the ColorView, it remembers a new color, and posts a delayed message to redisplay itself soon. If you click again, soon enough, it cancels that delayed message and posts another, and so on. When you stop clicking, the last message you posted will get delivered, and the view redraws just once.

It's sort of like being a painter in a hotel with a finicky owner. Every few minutes, the owner changes their mind about what color they want. So you call the front desk, and say "Wake me in an hour". If the owner wakes you up early to change the color again, you phone the front desk and say "Cancel that wake-up call, and wake me an hour from now". Only after the owner goes a full hour without changing their mind will you get a wake-up call (a delayed message) - and then it's time to paint.

Without delayed messaging, it would be very hard to "predict" whether a mouse click will be followed by another. With the ability to post a message for future delivery, it takes just a few lines of code.

Example #2: Are They Done Typing?

The world is full of query user interfaces in which you type what you want to find, then press Return (or click "OK" or "Find" or "Search" or...). But if doing a search doesn't take a lot of time, why make the user press return? Why not just search when the users pauses in typing?

Try it: Type one or two letters in the box labeled "Find:". A moment after you finish typing, the "Items found" scrolling list will change to list only entries containing what you typed. Type some more to refine the search, or delete characters to expand it again. Adjust the "Wait for pause of..." field to find a delay which works well for you.

Figure 2. Automatic querying.

This solution works much like the previous one, but instead of waiting for a pause after one or more mouse clicks, you're waiting for a pause after one or more keystrokes (or other changes).

We can't just override keyDown: like we did for mouseDown: in the last example, because the field can change for things other than keystrokes (such as by pasting or cutting text). But it's easy to monitor an NSTextField for changes: we make the application controller be the delegate of the field. (You can see this relationship by inspecting the field's connections in the nib file.)

Each time the user changes the field, the controller receives a controlTextDidChange: message. [NSTextField documentation in the DR2 release promises a textDidChange:, but this seems not to get sent, and NSControl documentation says it's controlTextDidChange:.] The application controller's implementation is in Listing 5. It wipes out the results of any previous search, cancels any previous, delayed reload messages, and sends a delayed reload message to the table.

Listing 5: Handling a change in a query field
- (void) controlTextDidChange
:(NSNotification *) notification; // IGNORED
{
// Wipe out any cached list of filtered objects.
[self setFilteredStrings : nil];

// Cancel any pending message.
[NSObject cancelPreviousPerformRequestsWithTarget
:findResults
selector :@selector(reloadData)
object :nil];

// Now tell the table to reload after the a delay.
// (When it reloads, it'll get a new list of strings.)
[findResults performSelector :@selector(reloadData)
withObject :nil
afterDelay :[findThreshhold floatValue]
/1000.0];
}

Let's skip the details of how reload redisplays the table to show only items matching your search string, but - in brief - it goes like this:

  • the table gets the delayed reloadData
  • the table sends numberOfRowsInTableView: to the controller
  • the controller computes [self filteredStrings]
  • filteredStrings finds and saves matching strings
  • the table sends tableView:objectValueForTableColumn: to the controller
  • the controller uses the filtered strings to find the object value

One other thing to note: the method awakeFromNib also sends reloadData to the table, which makes the table display its contents when the application starts, before you type anything.

Example #3: Did They Let Go of that Slider Yet?

All controls give you a choice of when you'd like them to send you their action message. For a button, you can ask to get the message continuously, as long they hold the mouse down in the button (useful for a scroller's arrow) or only when they release the button (useful for an "OK" button). You can set which way a control behaves with the setContinuous: method.

Suppose your 3-D drawing application has a slider used to set the viewing angle. While they're dragging the slider, you want to quickly draw a wire-frame image to give them an idea of what it'll look like. When they release the mouse, you want to redraw a full image.

But the slider sends only one type of action message, during dragging or when you release. How can you act on both"

If you want to do it the hard way, you could subclass NSSlider to support two types of action messages or to tell you if it's currently tracking. If you want to do it the elegant way, you could ask the shared NSApplication instance for currentEvent, which is the last event processed, and ask what kind of event provoked the action message. But this is an article about delayed messaging, so we'll do it the fun way.

Try it: The demo doesn't do wire-frame drawing, but as you drag the slider it does show you the "Sliding" value, then when you release the mouse, it'll show you the "Final" value.

Figure 3. Distinguishing dragging from mouse-up

This solution is a little tricky, and illustrates something about when delayed messages are actually delivered. As we've said before, a delayed message will never get delivered early, but it may get delivered late. This is because the application processes delayed messages only when it's idle. During the time you're dragging the mouse, the application is busy tracking the drag, and doesn't check if it needs to deliver delayed messages. So you can post a delayed message which says "the mouse went up", trusting that it won't get released until the user releases the mouse, and the control finishes tracking. (Nothing in the documentation promises this will work, so don't use this idea in a production application. But for demo purposes, it's fine.)

Listing 6 shows the implementation is simple: The slider sends mouseUpSliderAction: when you move it, and this method will:

  1. update the "Sliding" value in the UI
  2. wipe out any left-over "Final" value in the UI
  3. post a delayed _sliderFinished if it hasn't done so already
Listing 6: The action method for the slider
- (IBAction) mouseUpSliderAction :sender;
{
// Display "sliding" value, and clear "final" value
[mouseUpSlidingValue setIntValue
:[mouseUpSlider intValue]];
[mouseUpFinalValue setStringValue :@"--"];

// If this is our first time getting this message
// since they began dragging, we want to remember
// to do something when they release the mouse, too.
// If we haven't queued that reminder yet, do it now.
if (! mouseUpMessagePending)
{
[self performSelector :@selector(_sliderFinished)
withObject :nil
afterDelay :0];
mouseUpMessagePending = YES;
}
}

As you might guess, the _sliderFinished method clears the "Sliding" value, sets the "Final" value, and clears the flag. That's all there is to it.

Example #4: Simple Animation

You're almost done with that prototype which you want to sell to Microsoft, and it's got everything a Microsoft product should have: a complex UI, incompatible functionality, too many features, bugs galore... what else could Microsoft want?

Then you remember: They want a little assistant in the corner of the screen, animated to scratch or lick itself when you're not doing much. How can you animate when you don't have a real-time system - and how can you make sure the animation doesn't slow things down when the user is working?

If you've read this far, I hope you've guess the answer by now: you can do animation with delayed messaging.

Try it: Click "Run" to start the selection running around the matrix. Try typing different animation rates into the "Animate ... frames/second" field - you can type a new value while the animation is running.

(Now try dragging the slider (from example 3). The animation doesn't run while you're dragging. Again, delayed messages don't get delivered at all during certain operations.)

Figure 4. Simple animation

The code to implement this depends on one state variable, animationDirection, which keeps track of which way the selection is moving in the matrix. Clicking "Run" sends the animationRun: message, which just makes sure the direction is initialized, then sends _doAnimation to do the first "frame".

The _doAnimation method (shown in Listing 7) draws one "frame" by finding out what cell is selected and selecting the next one, reversing direction if it's reached the last cell. Then it calculates the current inter-frame delay from the text field, and queues a message to do itself again after that delay.

Listing 7: Drawing one "frame" of animation
- (void) _doAnimation;
{
int tag;
float delayInSeconds;

// Get current position; bump it in current direction
tag = [animationMatrix selectedTag];
tag += animationDirection;

// Cheap hack: If the tag runs off the end,
// there's no cell with that tag.
if ([animationMatrix cellWithTag :tag] == nil)
{
// Whoops! Switch direction and head the other way.
animationDirection = -animationDirection;
tag += (2*animationDirection);
}

// "Animate" to the new position. Because it's a set
// of radio buttons, we needn't deselect the old cell.
[animationMatrix selectCellWithTag :tag];

// Figure the delay, which may have changed if they
// typed a new number, and queue a message to
// do all this again.
delayInSeconds = [animationDelay floatValue]/1000.0;
[self performSelector :_cmd
withObject :nil
afterDelay :delayInSeconds];
}

Instead of using @selector(_doAnimation) as the selector, I chose to pass just _cmd. This obscure variable is automatically declared in every Objective-C method; it refers to the method currently being executed. Using it instead of the @selector(...) construct is largely a stylistic choice - I wanted to make it clear that the method is invoking itself.

But... wait a minute! If a method invokes itself unconditionally, doesn't that cause infinite recursion? Usually, yes. But in this case, the invocation doing the calling returns before it gets called again. So each invocation of the method happens independently of the previous ones - and without the previous ones on the stack.

So it's not recursive, but just like in a correct recursive algorithm, there is an end to the succession of invocations. If you click the "Stop" button, the animationStop: method will use cancelPreviousPerformRequestWithTarget:selector:object: to cancel the currently-pending invocation, breaking the chain and stopping the animation.

The Foundation Kit's NSTimer class provides another convenient way to do animation by repeatedly sending a message for you at fixed intervals. I chose delayed messaging here because it makes it easy to change the animation rate: note how _doAnimation immediately reacts to a new rate in the field, while it would be a little more complicated with a timer.

Again, keep in mind that delayed messages get performed only when the application is idle. You can have multiple animations running, but they'll take up no time during intensive computations. This can be useful if your UI needs to flash to show the user important conditions, but doesn't want to slow things down.

Other Applications

  • If updating an inspector or ruler slows your application, send it a delayed message. If the user changes the selection again soon, the inspector or ruler can avoid an unnecessary update.
  • You can minimize propagation in a two-level network. If multiple objects can trigger some reaction (such as recalculating) in a single target object, they can all send delayed messages with a zero delay, cancelling previous messages, and the target will receive just one message.
  • You can make an app terminate after a given period of inactivity by sending a delayed terminate: message to the application, then cancelling and re-posting the message each time there's some activity.
  • ...watch this space! I'd like to hear of uses you find for delayed messaging.

 

http://www.mactech.com/articles/mactech/Vol.14/14.12/DelayedMessaging/

神经网络自校正PID控制器自适应PID研究(Matlab代码实现) 内容概要:本文系统研究了神经网络自校正PID控制器在自适应控制中的应用,重点通过Matlab代码实现了该控制器的设计与仿真,并将其应用于永磁同步电机(PMSM)等复杂非线性系统的速度控制中。文章详细对比了该方法与传统PID控制、滑模控制的性能差异,验证了其在动态响应精度、鲁棒性及自适应调节能力方面的显著优势。资源包还提供了丰富的Simulink仿真模型,涵盖无位置传感器控制、高频注入法、负载转矩估计、滑模观测器、谐波抑制、弱磁控制等多种先进电机控制策略,构建了一个面向高性能电机驱动的综合算法研究平台。; 适合人群:具备自动控制理论基础和Matlab/Simulink仿真能力的研究生、科研人员,以及从事电机控制、智能控制算法开发的工程技术人员。; 使用场景及目标:①深入掌握神经网络与PID融合的自校正机制及其在非线性系统中的自适应调控原理;②开展PMSM先进控制策略(如无感控制、滑模观测、负载估计)的建模仿真与性能对比分析;③支撑科研项目验证、学术论文复现或毕业课题的技术实现与创新拓展。; 阅读建议:建议结合所提供的Matlab代码与Simulink模型进行动手实践,重点关注控制器结构设计、参数整定过程及仿真结果分析,同时参考配套文献以深化对控制理论和工程应用背景的理解,从而实现从理论到仿真的完整闭环学习与创新能力提升。 立即下载

相关推荐

嵌入式Linux Qt/QML开发实战:从Buildroot配置到应用部署

本文详细介绍了嵌入式Linux Qt/QML开发全流程,从Buildroot系统配置、交叉编译工具链搭建到应用部署与调试。以RK3506开发板为例,提供实战指南,帮助开发者高效完成嵌入式应用开发,解决常见环境配置与性能优化问题。

m2n3o4p5的博客 240

免费快速批量下载 LRC 歌词:163MusicLyrics 网易云与 QQ 音乐歌词完整上手指南

如果你本地存了几百首歌,播放器里却没有歌词,163MusicLyrics 是个趁手的工具:支持网易云音乐 LRC 歌词下载和 QQ 音乐批量歌词,还带 LRC 转 SRT,歌词时间轴同步展示。 ## 第一次上手:下载运行,先看到歌词 你可以从项目的 Release 页直接下载对应平台的可执行文件运行,也可以自己从源码编译(需要 .NET 开发环境): ```bash git clone ht

gitblog_00851的博客 167

GD32F303实战:用定时器4触发ADC2+DMA,实现10ms精准采样1024点的完整流程

本文详细介绍了在GD32F303微控制器上使用Timer4触发ADC2配合DMA传输,实现10ms精准采样1024点的完整方案。从硬件架构设计、时钟树配置到定时器参数计算,提供了完整的工程实现流程和常见问题排查方法,适用于工业传感器监测等高实时性场景。

weixin_29194693的博客 441

Folia 安装与部署指南:双击到自托管,5 条路线跑通全屏歌词播放器

安装最容易翻车的地方,是选错包:Intel Mac 拿了 arm64 的 dmg,NAS 上装了 Windows 版。Folia 是一款把歌词变成全屏沉浸动画的音乐播放器,支持本地曲库与网易云、QQ 音乐、酷狗,下面是从桌面到自托管的完整路线。 [![Folia 全屏歌词动画流光主题效果预览](https://raw.gitcode.com/GitHub_Trending/fo/folia-ma

gitblog_00821的博客 522

Python金融数据获取工具库之baostock使用详解

在金融数据分析和量化交易中,获取准确及时的市场数据是非常重要的。baostock是一个专门为中国股市数据提供支持的 Python 库,它提供了免费的股票数据接口,用户可以方便地获取股票、指数、基金等各种金融数据。本文将详细介绍baostock库,包括其安装方法、主要特性、基本和高级功能,以及实际应用场景,帮助全面了解并掌握该库的使用。

Rocky006的博客 5371

STM32 SYSTICK定时器及延时函数详解

STM32 SYSTICK及延时函数详解 SysTick定时器 SysTick定时器被捆绑在NVIC中,用于产生SYSTICK异常(异常号:15)。在以前,大多操作系统需要一个硬件定时器来产生操作系统需要的滴答中断,作为整个系统的时基。例如,为多个任务许以不同数目的时间片,确保没有一个任务能霸占系统;或者把每个定时器周期的某个时间范围赐予特定的任务等,还有操作系统提供的各种定时功能,都与这个滴答定时器有关。因此,需要一个定时器来产生周期性的中断,而且最好还让用户程序不能随意访问它的寄存器,以维持操作系统“心

w1050321758的博客 2377

rabbitmq3.7.4 详细教程

rabbitmq3.7.8 安装延时插件 或者

qq_29384639的博客 680

AutoLisp文件(.lsp)从编写到加载运行:一份给CAD新手的避坑指南

本文为CAD新手提供了一份AutoLisp文件(.lsp)从编写到加载运行的完整指南,涵盖编写环境配置、文件加载流程、调试技巧及工程化实践建议。通过详细的步骤和常见错误解决方案,帮助用户避免常见陷阱,提升AutoLisp脚本的开发效率和应用效果。

weixin_29228203的博客 946

Spring Boot RabbitMQ 延迟消息实现完整版

概述 曾经去网易面试的时候,面试官问了我一个问题,说 下完订单后,如果用户未支付,需要取消订单,可以怎么做 我当时的回答是,用定时任务扫描DB表即可。面试官不是很满意,提出: 用定时任务无法做到准实时通知,有没有其他办法? 我当时的回答是: 可以用队列,订单下完后,发送一个消息到队列里,并指定过期时间,时间一到,执行回调接口。 面试题听完后,就不再问了。其实我当时的思路是...

weixin_44048532的博客 213

别再到处找模型了!手把手教你用Xinference+Docker部署本地私有大模型(Llama2/Qwen实战)

本文详细介绍了如何使用Xinference和Docker部署本地私有化大模型(如Llama2/Qwen),涵盖硬件配置、模型管理、Docker部署及性能优化等关键步骤。通过实战案例,帮助开发者快速构建企业级AI推理服务,确保数据安全与高效运行。

weixin_28683065的博客 247

微信小程序 - 实现嵌套H5页面唤起微信支付的实现方案+完整流程源码,微信小程序webview(H5页面)调用微信小程序支付,嵌套h5页面怎么实现小程序支付(Vue2/3移动端H5网页、公众号网页等)

h5嵌入微信小程序微信支付,H5网页嵌入到微信小程序内如何支付,微信小程序webview组件交互,内联h5页面并网页实现微信支付,微信H5页面实现微信小程序支付,微信小程序嵌套webview实现小程序微信支付,小程序中内嵌H5网页支付怎么办,用网页的支付还是小程序的支付?支付没反应,支付报错怎么办,微信小程序内嵌h5,h5调用小程序支付功能解决方案,H5网页cors跨域,真机测试无法唤起支付,无法唤起支付,uniapp微信小程序,h5小程序调用微信支付,微信小程序内嵌H5页面,如何实现微信支付功能,微信小程

🏆 前端领域优质创作者 1万+

NVKE os-image 模块开发指南:节点 OS 镜像的构建契约、版本发布与安全不变量

NVKE 的 `os-image/` 模块负责产出节点真正启动的那个 Ubuntu qcow2 镜像,并在其中预置 `nvke-agent` 与 `spire-agent`,使站点控制器能够通过 SPIFFE mTLS 访问节点。本文以该模块的开发约定为主线,逐条拆解它的目录职责、组件级版本发布流程、Packer 构建链、镜像契约与不可违反的安全约束,并结合仓库源码说明每条规则背后的具体实现与失败

gitblog_00438的博客 453

【24届数字IC秋招总结】正式批面试经验汇总6——禾赛

15、ahb写或者读的数据存储起来了嘛,ahb读的话,apb这边是怎样的。19、覆盖率收集的时候有没有哪些是很难收集到的,然后写了定向测试。2、C++有学过嘛 还记得C++的什么内容 C++成绩多少。12、config_db机制用过嘛 四个参数的含义。8、脚本语言有学过嘛 简单学过 简单是指代码数少嘛。13、run_phase和mian_phase的区别。10、覆盖机制的创建方法 ,是不是覆盖用的很少。6、call_back机制记得哪些细节的东西。9、uvm实战学了哪些章节 印象深刻的章节。

qq_42135020的博客 1099

Apache Pulsar 延迟消息投递:PIP-26 设计原理与 Broker 端实现解析

本文基于 PIP-26(Delayed Message Delivery)展开,系统讲解 Pulsar 延迟/定时消息的完整机制:客户端如何按条消息设置投递时间、Broker 如何用"延迟消息索引"暂存并按时派发消息、以及该功能在协议、Dispatcher 和订阅模型上的约束。读完后,你将掌握 `deliverAfter`/`deliverAt` 的使用方式、`enable-delayed-mes

gitblog_01093的博客 391

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

Apache Pulsar 2.4.0 新特性深度解析:延迟消息、Key_Shared 订阅与复制订阅实战指南

本篇技术指南围绕 Apache Pulsar 2.4.0 发布的核心新特性展开,涵盖延迟消息投递(Delayed Message Delivery)、Go Functions、Key_Shared 订阅模式、Schema 多版本兼容、跨地域复制订阅、新增 IO Connectors 以及 Kerberos 安全支持。读完本文,你将掌握这些特性的客户端使用方式、Broker 端关键配置项,并能从源码

gitblog_01019的博客 163

Probability and Statistics - 4th edition

Probability and Statistics - 4th edition

Apache Pulsar PIP-315 深度解析:为延迟消息投递引入可配置的最大延迟上限(maxDeliveryDelayInMillis)

Apache Pulsar 的延迟消息投递(Delayed Delivery)允许生产者指定消息在未来某个时间点才被消费,但长期以来 Broker 对生产者可以设定的延迟时长没有任何上限约束。PIP-315 提出并落地了一个新的可配置项 `maxDeliveryDelayInMillis`,让集群管理员能够在 Broker、命名空间(Namespace)与主题(Topic)三个粒度限制延迟投递的最

gitblog_00365的博客 825

迈瑞BS系列全自动生化分析仪LIS协议接口手册(内含HL7和ASTM)

迈瑞BS系列全自动生化分析仪LIS协议接口手册,内含HL7和ASTM)

SWE-RL异步推理架构:OpenAIClient并发请求与指数退避重试实现

SWE-RL异步推理架构是开源项目 SWE-RL(NeurIPS'25 官方代码库)中驱动大规模 LLM 推理的关键设计,其核心是封装在 `OpenAIClient` 中的并发请求调度与指数退避重试机制。本文面向新手与普通开发者,用通俗的语言拆解这套架构:它如何让成百上千个 OpenAI 兼容接口请求稳定、高速地并发执行,又如何在遭遇限流时优雅降级、自动重试,从而支撑起 SWE-RL 在真实软件工

gitblog_00732的博客 492

Apache Pulsar 2.5.1 特性深度解析:认证刷新、Bundle 均衡分裂与稳定性增强

Apache Pulsar 2.5.1 是社区基于 2.5.0 的又一重要维护版本,累计包含超过 130 个提交,覆盖新特性、通用改进与大量 Bug 修复。本文以官方发布说明为骨架,结合当前仓库源码,逐项拆解 2.5.1 的核心变更:从支持凭证过期的认证刷新机制、按 Topic 数量均衡分裂 Bundle 的新 Load Manager,到避免 Broker 内存溢出的发布缓冲上限、BouncyC

gitblog_00954的博客 354

全网最全RabbitMQ笔记 | 万字长文爆肝RabbitMQ高级

本文介绍了如何确保RabbitMQ消息的可靠性,重点讲解了生产者端的可靠性保障措施。主要内容包括: 生产者重试机制:通过配置连接超时和重试参数,在网络故障时自动重试发送消息。 生产者确认机制: 开启Publisher Confirm和Publisher Return机制 配置ReturnCallback统一处理路由失败情况 使用CorrelationData为每条消息添加ConfirmCallback处理确认回执 消息丢失的可能场景分析: 生产者到MQ的发送过程 MQ内部处理过程 消费者处理过程 文章通过代

qq_45832461的博客 961

Apache Pulsar 客户端 CLI 按时间范围消费消息:PIP-435 的 `--start-timestamp` 与 `--end-timestamp` 设计与实现

本文讲解 Apache Pulsar 通过 PIP-435 引入的按时间范围消费能力:在 `pulsar-client consume` 命令行工具中新增 `--start-timestamp`(`-stp`)与 `--end-timestamp`(`-etp`)两个选项,让用户可以从指定的起始时间戳开始消费消息,并在消息发布时间超出结束时间戳时自动停止。读完本文你将掌握这两个参数的语义、默认值与

gitblog_00241的博客 135

Apache RocketMQ 批量消息发送实战指南:4MiB 限制、ListSplitter 拆分与源码级原理

批量发送是 Apache RocketMQ 生产端提升发送效率、抬高系统吞吐量的核心技术手段:它把多条消息封装成一次网络请求提交给 Broker,显著减少 RPC 往返次数。本文以官方文档《批量消息发送》为主线,结合仓库中的生产端示例 [SimpleBatchProducer.java](https://link.gitcode.com/i/2e691b426bc9cfc10fcd021f5bbd

gitblog_09705的博客 537

Apache Pulsar 消息传递核心概念:从消息、生产者、消费者到订阅模式与消息持久化机制详解

Pulsar 的整个消息传递体系建立在发布-订阅(pub-sub)模式之上:**生产者(producers)** 把消息发布到 **主题(topics)**,**消费者(consumers)** 通过 **订阅(subscriptions)** 订阅这些主题,处理收到的消息并在完成后发送确认(acknowledgement)。本文以 Pulsar 2.2.1 版本概念文档为主线,结合当前仓库源码与

gitblog_00638的博客 929

macOS 装 Office 不用来回折腾:5 步完成静默安装与激活的实操记录

如果你在 macOS 上部署 Office,微软官方的流程大概能让你绕上好几天:新版安装包只认新系统,旧系统又只能用旧版本,而批量授权(Volume License,下称 VL)版本还要求单独装一个序列化工具(Serializer)来写入许可证,选错了就永远弹"未授权"。Microsoft-Office-For-MacOS 就是一个开源工具集,把 2016 到 2024 LTSC 各版本的序列化工

gitblog_00854的博客 167

Apache Pulsar PIP-58 深度解析:Consumer 自定义重试延迟(reconsumeLater)的设计、实现与实战

PIP-58("Support Consumers Set Custom Retry Delay",状态 Accepted,由 Dezhi Liu 提出,随 Apache Pulsar 2.6.0 发布)为 Pulsar 消费者引入了 **自定义重试延迟** 能力:业务处理失败时,可以直接通过 `Consumer` 上的 `reconsumeLater` 系列接口,让消息在用户指定的延迟后重新投递

gitblog_00880的博客 395

Apache Pulsar pulsar-admin 管理 CLI 命令参考与实战指南

`pulsar-admin` 是 Apache Pulsar 自带的命令行管理工具,用于对 Pulsar 集群的集群、Broker、命名空间、租户、Topic、Schema、资源配额、Pulsar Functions 等进行全生命周期管理。本文以 [reference-pulsar-admin.md](https://gitcode.com/gh_mirrors/pulsar28/pulsar/b

gitblog_00956的博客 198

Zebra 开发者工作流全解:RFC 提案、CI/CD 流水线与发布流程,参与 Zcash 全节点贡献的完整路线图

Zebra 是 Zcash 基金会用 Rust 语言构建的下一代全节点实现,以模块化架构和异步网络栈著称。对于希望参与 Zcash 区块链基础设施开发的工程师来说,理解 Zebra 的开发者工作流是贡献代码的第一步——本文系统梳理 Zebra 项目从 RFC 设计提案、持续集成/持续交付(CI/CD)流水线到版本发布的完整开发者路线图,帮助你快速融入这个开源生态。 ## 📋 从 RFC 模板开

gitblog_00281的博客 295
上一篇: cocoa 延时message
下一篇: Iphone UIImage
nitghost
博客等级 码龄19年 32粉丝 111原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址